forked from All-Hands-AI/OpenHands
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
331 additions
and
46 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
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
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,56 @@ | ||
--- | ||
name: docker | ||
type: knowledge | ||
version: 1.0.0 | ||
agent: CodeActAgent | ||
triggers: | ||
- docker | ||
- container | ||
--- | ||
|
||
# Docker Installation and Usage Guide | ||
|
||
## Installation on Debian/Ubuntu Systems | ||
|
||
To install Docker on a Debian/Ubuntu system, follow these steps: | ||
|
||
```bash | ||
# Update package index | ||
sudo apt-get update | ||
|
||
# Install prerequisites | ||
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release | ||
|
||
# Add Docker's official GPG key | ||
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | ||
|
||
# Set up the stable repository | ||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
|
||
# Update package index again | ||
sudo apt-get update | ||
|
||
# Install Docker Engine | ||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io | ||
``` | ||
|
||
## Starting Docker in Container Environments | ||
|
||
If you're in a container environment without systemd (like this workspace), start Docker with: | ||
|
||
```bash | ||
# Start Docker daemon in the background | ||
sudo dockerd > /tmp/docker.log 2>&1 & | ||
|
||
# Wait for Docker to initialize | ||
sleep 5 | ||
``` | ||
|
||
## Verifying Docker Installation | ||
|
||
To verify Docker is working correctly, run the hello-world container: | ||
|
||
```bash | ||
sudo docker run hello-world | ||
``` | ||
|
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,50 @@ | ||
--- | ||
name: kubernetes | ||
type: knowledge | ||
version: 1.0.0 | ||
agent: CodeActAgent | ||
triggers: | ||
- kubernetes | ||
- k8s | ||
- kube | ||
--- | ||
|
||
# Kubernetes Local Development with KIND | ||
|
||
## KIND Installation and Setup | ||
|
||
KIND (Kubernetes IN Docker) is a tool for running local Kubernetes clusters using Docker containers as nodes. It's designed for testing Kubernetes applications locally. | ||
|
||
IMPORTANT: Before you proceed with installation, make sure you have docker installed locally. | ||
|
||
### Installation | ||
|
||
To install KIND on a Debian/Ubuntu system: | ||
|
||
```bash | ||
# Download KIND binary | ||
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64 | ||
# Make it executable | ||
chmod +x ./kind | ||
# Move to a directory in your PATH | ||
sudo mv ./kind /usr/local/bin/ | ||
``` | ||
|
||
To install kubectl: | ||
|
||
```bash | ||
# Download kubectl | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
# Make it executable | ||
chmod +x kubectl | ||
# Move to a directory in your PATH | ||
sudo mv ./kubectl /usr/local/bin/ | ||
``` | ||
|
||
### Creating a Cluster | ||
|
||
Create a basic KIND cluster: | ||
|
||
```bash | ||
kind create cluster | ||
``` |
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 |
---|---|---|
@@ -1,11 +1,39 @@ | ||
from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk | ||
|
||
_FINISH_DESCRIPTION = """Finish the interaction when the task is complete OR if the assistant cannot proceed further with the task.""" | ||
_FINISH_DESCRIPTION = """Signals the completion of the current task or conversation. | ||
Use this tool when: | ||
- You have successfully completed the user's requested task | ||
- You cannot proceed further due to technical limitations or missing information | ||
The message should include: | ||
- A clear summary of actions taken and their results | ||
- Any next steps for the user | ||
- Explanation if you're unable to complete the task | ||
- Any follow-up questions if more information is needed | ||
The task_completed field should be set to True if you believed you have completed the task, and False otherwise. | ||
""" | ||
|
||
FinishTool = ChatCompletionToolParam( | ||
type='function', | ||
function=ChatCompletionToolParamFunctionChunk( | ||
name='finish', | ||
description=_FINISH_DESCRIPTION, | ||
parameters={ | ||
'type': 'object', | ||
'required': ['message', 'task_completed'], | ||
'properties': { | ||
'message': { | ||
'type': 'string', | ||
'description': 'Final message to send to the user', | ||
}, | ||
'task_completed': { | ||
'type': 'string', | ||
'enum': ['true', 'false', 'partial'], | ||
'description': 'Whether you have completed the task.', | ||
}, | ||
}, | ||
}, | ||
), | ||
) |
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.