mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 10:54:19 +00:00
add a warning at least for when bwrap
is not available for code execution
This commit is contained in:
parent
66440e2c20
commit
cdfc98cf08
1 changed files with 12 additions and 0 deletions
|
@ -6,9 +6,12 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import shutil
|
||||||
import uuid
|
import uuid
|
||||||
from typing import AsyncGenerator
|
from typing import AsyncGenerator
|
||||||
|
|
||||||
|
from termcolor import colored
|
||||||
|
|
||||||
from llama_stack.apis.inference import Inference
|
from llama_stack.apis.inference import Inference
|
||||||
from llama_stack.apis.memory import Memory
|
from llama_stack.apis.memory import Memory
|
||||||
from llama_stack.apis.memory_banks import MemoryBanks
|
from llama_stack.apis.memory_banks import MemoryBanks
|
||||||
|
@ -44,6 +47,15 @@ class MetaReferenceAgentsImpl(Agents):
|
||||||
async def initialize(self) -> None:
|
async def initialize(self) -> None:
|
||||||
self.persistence_store = await kvstore_impl(self.config.persistence_store)
|
self.persistence_store = await kvstore_impl(self.config.persistence_store)
|
||||||
|
|
||||||
|
# check if "bwrap" is available
|
||||||
|
if not shutil.which("bwrap"):
|
||||||
|
print(
|
||||||
|
colored(
|
||||||
|
"Warning: `bwrap` is not available. Code interpreter tool will not work correctly.",
|
||||||
|
"yellow",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
async def create_agent(
|
async def create_agent(
|
||||||
self,
|
self,
|
||||||
agent_config: AgentConfig,
|
agent_config: AgentConfig,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue