MSUSAzureAccelerators / Azure-Cognitive-Search-Azure-OpenAI-Accelerator

Virtual Assistant - GPT Smart Search Engine - Bot Framework + Azure OpenAI + Azure AI Search + Azure SQL + Bing API + Azure Document Intelligence + LangChain + CosmosDB
https://gptsmartsearchapp.azurewebsites.net
MIT License
326 stars 540 forks source link

Where should I set the table_info parameter? #33

Closed tyler-suard-parker closed 10 months ago

tyler-suard-parker commented 10 months ago

Hello. In Prompts.py around line 294, there is a variable called table_info, for designating which tables the agent should search. It is not obvious in your code where this variable should be set.

pablomarin commented 10 months ago

This is a variable that is dynamically populated by the langchain's sql agent. Refer to the langchain repo so you can understand how the agent works:

https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/agents/agent_toolkits/sql/toolkit.py https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/tools/sql_database/tool.py