forked from phoenix-oss/llama-stack-mirror
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 logging
|
||||
import shutil
|
||||
import uuid
|
||||
from typing import AsyncGenerator
|
||||
|
||||
from termcolor import colored
|
||||
|
||||
from llama_stack.apis.inference import Inference
|
||||
from llama_stack.apis.memory import Memory
|
||||
from llama_stack.apis.memory_banks import MemoryBanks
|
||||
|
@ -44,6 +47,15 @@ class MetaReferenceAgentsImpl(Agents):
|
|||
async def initialize(self) -> None:
|
||||
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(
|
||||
self,
|
||||
agent_config: AgentConfig,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue