Spaces:
Sleeping
Sleeping
updated
Browse files
agent.py
CHANGED
|
@@ -45,8 +45,7 @@ def create_assistant_tools(cfg):
|
|
| 45 |
query: str = Field(..., description="The user query, always in the form of a question", examples=["what are the risks reported?", "which drug was use on the and how big was the population?"])
|
| 46 |
|
| 47 |
vec_factory = VectaraToolFactory(vectara_api_key=cfg.api_key,
|
| 48 |
-
|
| 49 |
-
vectara_corpus_id=cfg.corpus_id)
|
| 50 |
summarizer = 'vectara-summary-table-md-query-ext-jan-2025-gpt-4o'
|
| 51 |
ask_publications = vec_factory.create_rag_tool(
|
| 52 |
tool_name = "ask_publications",
|
|
|
|
| 45 |
query: str = Field(..., description="The user query, always in the form of a question", examples=["what are the risks reported?", "which drug was use on the and how big was the population?"])
|
| 46 |
|
| 47 |
vec_factory = VectaraToolFactory(vectara_api_key=cfg.api_key,
|
| 48 |
+
vectara_corpus_key=cfg.corpus_key)
|
|
|
|
| 49 |
summarizer = 'vectara-summary-table-md-query-ext-jan-2025-gpt-4o'
|
| 50 |
ask_publications = vec_factory.create_rag_tool(
|
| 51 |
tool_name = "ask_publications",
|
config.py
CHANGED
|
@@ -5,8 +5,7 @@ load_dotenv(override=True)
|
|
| 5 |
|
| 6 |
def get_agent_config() -> OmegaConf:
|
| 7 |
cfg = OmegaConf.create({
|
| 8 |
-
'
|
| 9 |
-
'corpus_id': str(os.environ['VECTARA_CORPUS_ID']),
|
| 10 |
'api_key': str(os.environ['VECTARA_API_KEY'])
|
| 11 |
})
|
| 12 |
return cfg
|
|
|
|
| 5 |
|
| 6 |
def get_agent_config() -> OmegaConf:
|
| 7 |
cfg = OmegaConf.create({
|
| 8 |
+
'corpus_key': str(os.environ['VECTARA_CORPUS_KEY']),
|
|
|
|
| 9 |
'api_key': str(os.environ['VECTARA_API_KEY'])
|
| 10 |
})
|
| 11 |
return cfg
|