Skip to content

Commit

Permalink
feat(code-interpreter): update to 0.0.11 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPokorny authored Oct 1, 2024
1 parent f718236 commit f136a09
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
volumes:
- k3s-containerd:/var/lib/rancher/k3s/agent/containerd
- ./infra/bee-code-interpreter/k8s:/var/lib/rancher/k3s/server/manifests
- ${CODE_INTEPRETER_TMPDIR:-./examples/tmp/code_interpreter}:/storage
ports:
- "50051:30051"
healthcheck:
Expand Down
8 changes: 6 additions & 2 deletions examples/agents/bee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ const llm = new OllamaChatLLM({
const codeInterpreterUrl = process.env.CODE_INTERPRETER_URL;
const __dirname = dirname(fileURLToPath(import.meta.url));

const codeInterpreterTmpdir =
process.env.CODE_INTEPRETER_TMPDIR ?? "./examples/tmp/code_interpreter";
const localTmpdir = process.env.LOCAL_TMPDIR ?? "./examples/tmp/local";

const agent = new BeeAgent({
llm,
memory: new TokenMemory({ llm }),
Expand All @@ -38,8 +42,8 @@ const agent = new BeeAgent({
new PythonTool({
codeInterpreter: { url: codeInterpreterUrl },
storage: new LocalPythonStorage({
interpreterWorkingDir: `${__dirname}/../tmp/code_interpreter`,
localWorkingDir: `${__dirname}/../tmp/local`,
interpreterWorkingDir: `${__dirname}/../../${codeInterpreterTmpdir}`,
localWorkingDir: `${__dirname}/../../${localTmpdir}`,
}),
}),
]
Expand Down
14 changes: 12 additions & 2 deletions infra/bee-code-interpreter/k8s/bee-code-interpreter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,22 @@ spec:
serviceAccountName: code-interpreter-sa
containers:
- name: code-interpreter
image: docker.io/iambeeagent/bee-code-interpreter:0.0.7
image: docker.io/iambeeagent/bee-code-interpreter:0.0.11
ports:
- containerPort: 50051
env:
- name: APP_EXECUTOR_IMAGE
value: docker.io/iambeeagent/bee-code-executor:0.0.7
value: docker.io/iambeeagent/bee-code-executor:0.0.11
- name: APP_FILE_STORAGE_PATH
value: /storage
volumeMounts:
- name: storage-volume
mountPath: /storage
volumes:
- name: storage-volume
hostPath:
path: /storage
type: Directory
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit f136a09

Please sign in to comment.