mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
fix: add a bunch more keys to be passed as provider data for client-sdk tests
This commit is contained in:
parent
5c9d12a206
commit
c3155cb1bc
1 changed files with 13 additions and 5 deletions
|
@ -81,12 +81,20 @@ def pytest_addoption(parser):
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def provider_data():
|
def provider_data():
|
||||||
# check env for tavily secret, brave secret and inject all into provider data
|
keymap = {
|
||||||
|
"TAVILY_SEARCH_API_KEY": "tavily_search_api_key",
|
||||||
|
"BRAVE_SEARCH_API_KEY": "brave_search_api_key",
|
||||||
|
"FIREWORKS_API_KEY": "fireworks_api_key",
|
||||||
|
"GEMINI_API_KEY": "gemini_api_key",
|
||||||
|
"OPENAI_API_KEY": "openai_api_key",
|
||||||
|
"TOGETHER_API_KEY": "together_api_key",
|
||||||
|
"ANTHROPIC_API_KEY": "anthropic_api_key",
|
||||||
|
"GROQ_API_KEY": "groq_api_key",
|
||||||
|
}
|
||||||
provider_data = {}
|
provider_data = {}
|
||||||
if os.environ.get("TAVILY_SEARCH_API_KEY"):
|
for key, value in keymap.items():
|
||||||
provider_data["tavily_search_api_key"] = os.environ["TAVILY_SEARCH_API_KEY"]
|
if os.environ.get(key):
|
||||||
if os.environ.get("BRAVE_SEARCH_API_KEY"):
|
provider_data[value] = os.environ[key]
|
||||||
provider_data["brave_search_api_key"] = os.environ["BRAVE_SEARCH_API_KEY"]
|
|
||||||
return provider_data if len(provider_data) > 0 else None
|
return provider_data if len(provider_data) > 0 else None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue