mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 04:17:32 +00:00
API Keys passed from Client instead of distro configuration
This commit is contained in:
parent
a11d92601b
commit
0df4d9c9bd
5 changed files with 16 additions and 21 deletions
|
@ -6,11 +6,12 @@
|
|||
|
||||
import asyncio
|
||||
import json
|
||||
import os
|
||||
from typing import AsyncGenerator
|
||||
|
||||
import fire
|
||||
|
||||
import httpx
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from pydantic import BaseModel
|
||||
from termcolor import cprint
|
||||
|
@ -22,6 +23,9 @@ from .api import * # noqa: F403
|
|||
from .event_logger import EventLogger
|
||||
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
async def get_client_impl(config: RemoteProviderConfig, _deps):
|
||||
return AgenticSystemClient(config.url)
|
||||
|
||||
|
@ -134,8 +138,11 @@ async def run_main(host: str, port: int):
|
|||
api = AgenticSystemClient(f"http://{host}:{port}")
|
||||
|
||||
tool_definitions = [
|
||||
SearchToolDefinition(engine=SearchEngineType.bing),
|
||||
WolframAlphaToolDefinition(),
|
||||
SearchToolDefinition(
|
||||
engine=SearchEngineType.bing,
|
||||
api_key=os.getenv("BING_SEARCH_API_KEY"),
|
||||
),
|
||||
WolframAlphaToolDefinition(api_key=os.getenv("WOLFRAM_ALPHA_API_KEY")),
|
||||
CodeInterpreterToolDefinition(),
|
||||
]
|
||||
tool_definitions += [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue