Hello
I am testing the Assistant creation, from this url TaskingAI-Python-Client/examples/assistant/chat_with_assistant.ipynb at master · TaskingAI/TaskingAI-Python-Client · GitHub
I encountered a json validation issue which finally passed this way
“openapi”: “3.0.0”,
“info”: {
“title”: “Numbers API”,
“version”: “1.0.0”,
“description”: “API for fetching interesting number facts”
},
“servers”: [
{
“url”: “http://numbersapi.com”
}
],
“paths”: {
“/{number}”: {
“get”: {
“description”: “Get a fact about a number”,
“operationId”: “getNumberFact”,
“parameters”: [
{
“name”: “number”,
“in”: “path”,
“required”: True,
“description”: “The number to get the fact for”,
“schema”: {
“type”: “integer”
}
}
],
“responses”: {
“200”: {
“description”: “A fact about the number”,
“content”: {
“text/plain”: {
“schema”: {
“type”: “string”
}
}
}
}
}
}
}
}
}
The following instruction:
actions: List[Action] = taskingai.tool.bulk_create_actions(
openapi_schema=NUMBERS_API_SCHEMA,
authentication=ActionAuthentication(
type=ActionAuthenticationType.NONE,
)
)
action = actions[0]
print(f"created action: {action}\n")
give me this error :
ApiException: (401)
Reason: Unauthorized
HTTP response headers: Headers({‘date’: ‘Sat, 25 May 2024 07:20:32 GMT’, ‘content-type’: ‘application/json’, ‘content-length’: ‘100’, ‘connection’: ‘keep-alive’, ‘server’: ‘uvicorn’, ‘x-kong-upstream-latency’: ‘3’, ‘x-kong-proxy-latency’: ‘5’, ‘via’: ‘kong/3.5.0’, ‘x-kong-request-id’: ‘014a9119054fe40e834b1214a2d12a10’})
HTTP response body: b’{“status”:“error”,“error”:{“code”:“APIKEY_VALIDATION_FAILED”,“message”:“API Key validation failed”}}’
Can you please help, I am testing the SDK on Colab. The OPENAI_API_KEY and TASKINGAI_API_KEY are setup as global variables. I was able to integrate the JSON code above with the TaskingAI interface (action) and the new assistant I created through the interface worked successfully. Will appreciate your help and support,