создание и маунт папки /workspace
This commit is contained in:
parent
a176dcac52
commit
745512aa4b
5 changed files with 16 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ import os
|
|||
from deepagents import create_deep_agent
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langgraph.checkpoint.memory import MemorySaver
|
||||
from deepagents.backends.local_shell import LocalShellBackend
|
||||
|
||||
|
||||
def create_agent():
|
||||
|
|
@ -11,9 +12,14 @@ def create_agent():
|
|||
api_key=os.environ["PROVIDER_API_KEY"],
|
||||
)
|
||||
|
||||
workspace_dir = os.environ["WORKSPACE_DIR"]
|
||||
backend = LocalShellBackend(workspace_dir,
|
||||
virtual_mode=True)
|
||||
|
||||
return create_deep_agent(
|
||||
model=model,
|
||||
system_prompt="You are a helpful assistant.",
|
||||
checkpointer=MemorySaver(),
|
||||
backend=backend,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue