Spaces:
Running
Running
Commit ·
2c232f0
1
Parent(s): f05f246
added the fix on ChromaDB - ValueError: Could not connect to tenant default_tenant
Browse files17 unmodified lines1819202122232433 unmodified lines585960616263646523 unmodified lines899091929394959617 unmodified linesdef generate_response(problem):# 1. create an AssistantAgent instance named "assistant"assistant_system_message = """You are able to write code blocks in the chat based on the given Open API Specification to complete the given task.Your response must follow the following requirements:33 unmodified lines"https://developer.ferguson.com/sites/default/files/2021-05/Ferguson-API-Products-1.0.12-resolved.json",# "https://developer.ferguson.com/sites/default/files/2021-05/Ferguson-API-API-Quote-1.0.5-resolved.json","https://developer.ferguson.com/sites/default/files/2021-05/Ferguson-API-API-Location-2.0.0-resolved.json",## "https://raw.githubusercontent.com/jaredlang/sample-services/refs/heads/main/inventory/inventory-query-service-api-spec.yaml",],"chunk_token_size": 2000,"model": gpt4o_llm_config["config_list"][0]["model"],23 unmodified lines# With human-in-loop, the conversation will continue until the user says "exit".# RetrieveUserProxyAgent system message is empty!!!print("RetrieveUserProxyAgent system message: ", ragproxyagent.system_message)print("RetrieveUserProxyAgent message_generator: ", ragproxyagent.message_generator)# initiate the chat with the assistantchat_result = ragproxyagent.initiate_chat(assistant, message=ragproxyagent.message_generator, problem=problem, max_turns=1, silent=False)17 unmodified lines18192021222333 unmodified lines57585960616223 unmodified lines868788899091929394959617 unmodified linesdef generate_response(problem):# 1. create an AssistantAgent instance named "assistant"assistant_system_message = """You are able to write code blocks in the chat based on the given Open API Specification to complete the given task.Your response must follow the following requirements:33 unmodified lines"https://developer.ferguson.com/sites/default/files/2021-05/Ferguson-API-Products-1.0.12-resolved.json",# "https://developer.ferguson.com/sites/default/files/2021-05/Ferguson-API-API-Quote-1.0.5-resolved.json","https://developer.ferguson.com/sites/default/files/2021-05/Ferguson-API-API-Location-2.0.0-resolved.json",],"chunk_token_size": 2000,"model": gpt4o_llm_config["config_list"][0]["model"],23 unmodified lines# With human-in-loop, the conversation will continue until the user says "exit".# RetrieveUserProxyAgent system message is empty!!!# print("RetrieveUserProxyAgent system message: ", ragproxyagent.system_message)# print("RetrieveUserProxyAgent message_generator: ", ragproxyagent.message_generator)import chromadbchromadb.api.client.SharedSystemClient.clear_system_cache()# initiate the chat with the assistantchat_result = ragproxyagent.initiate_chat(assistant, message=ragproxyagent.message_generator, problem=problem, max_turns=1, silent=False)
app.py+5-5