-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: apply the generated manifests to cluster
- Loading branch information
Showing
13 changed files
with
161 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build-push-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build Docker image | ||
run: | | ||
docker build -t ${{ env.REGISTRY }}/${{ github.repository_owner }}/kube-copilot:${{ github.ref_name }} . | ||
docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/kube-copilot:${{ github.ref_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from langchain.callbacks.streamlit.streamlit_callback_handler import ToolRecord, LLMThoughtLabeler | ||
|
||
|
||
CHECKMARK_EMOJI = "✅" | ||
THINKING_EMOJI = ":thinking_face:" | ||
HISTORY_EMOJI = ":books:" | ||
EXCEPTION_EMOJI = "⚠️" | ||
|
||
|
||
class CustomLLMThoughtLabeler(LLMThoughtLabeler): | ||
def get_tool_label(self, tool: ToolRecord, is_complete: bool) -> str: | ||
"""Return the label for an LLMThought that has an associated | ||
tool. | ||
Parameters | ||
---------- | ||
tool | ||
The tool's ToolRecord | ||
is_complete | ||
True if the thought is complete; False if the thought | ||
is still receiving input. | ||
Returns | ||
------- | ||
The markdown label for the thought's container. | ||
""" | ||
input = tool.input_str.strip() | ||
name = tool.name | ||
emoji = CHECKMARK_EMOJI if is_complete else THINKING_EMOJI | ||
if name == "_Exception": | ||
emoji = EXCEPTION_EMOJI | ||
name = "Parsing error" | ||
# idx = min([60, len(input)]) | ||
# input = input[0:idx] | ||
# if len(tool.input_str) > idx: | ||
# input = input + "..." | ||
# input = input.replace("\n", " ") | ||
label = f"{emoji} **{name}:** {input}" | ||
return label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.