i am using voice flow, and conntect through replit and created a chat bot. the conversation world and is fine. but the moment I add numbers it doesn’t work and replies back with this error?
API call error - {“status”:400, “data”:
{“VF_STATUS_CODE”:400, “VF_HEADERS”:(“alt-svc”:“h3=”:443"; ma=2592000,h3-29=“:443”; ma=2592000", “connection”:“close”, “content-length”:“167”, “content-type”:“text/html; charset=utf-8”, “date”: “Mon, 15 Jul 2024 01:38:12
GMT”, “server”:“Werkzeug/3.0.1 Python/3.10.14”, “strict-transport-security”:“max-age=63072000; includeSubDomains”, “via”:“1.1 google”}}}
Failed to create generate response!
my replit function code is as follows;
import json
import os
def create_assistant(client):
assistant_file_path = 'assistant.json'
if os.path.exists(assistant_file_path):
with open(assistant_file_path, 'r') as file:
assistant_data = json.load(file)
assistant_id = assistant_data['assistant_id']
print("Loaded existing assistant ID.")
else:
file = client.files.create(file=open("knowledge.docx", "rb"),
purpose='assistants')
assistant = client.beta.assistants.create(instructions="""
The assistant, Investment Insight has been programmed to provide potential customers with information on Australian Property Investing. Helping make informed decisions.
""",
model="gpt-4-tubro",
tools=[{
"type": "retrieval"
}],
file_ids=[file.id])
with open(assistant_file_path, 'w') as file:
json.dump({'assistant_id': assistant.id}, file)
print("Created a new assistant and saved the ID.")
assistant_id = assistant.id
return assistant_id
Any help and Im happy to pay. would be amazing to solve this asap.