Azure OpenAI Studio - Exception in send_chat_request - Error code: 400 - ... "Validation error at #/data_sources/0: Input tag 'azure_cosmosdb' found using 'type' does not match any of the expected tags

Yurii Bondarchuk 0 Reputation points
2024-06-04T13:28:20.9433333+00:00

Created a chat bot in Azure OpenAI Studio
based on model GPT4o and with Azure Cosmos DB for MongoDB (vCore) as data source **
**
It worked successfully in Chat playground (Azure OpenAI Studio)
But when deployed as application each request fails with Validation error
Input tag 'azure_cosmosdb' found using 'type' does not match any of the expected tags

openai.BadRequestError: Error code: 400 - {'error': {'requestid': '.....', 'code': 400, 'message': "Validation error at #/data_sources/0: Input tag 'azure_cosmosdb' found using 'type' does not match any of the expected tags: .... 'azure_cosmos_db',.....'"}}

[ERROR] Traceback (most recent call last):

File "/tmp/8dc81ac377ae252/app.py", line 356, in conversation_internal

result = await stream_chat_request(request_body, request_headers)

File "/tmp/8dc81ac377ae252/app.py", line 343, in stream_chat_request

response, apim_request_id = await send_chat_request(request_body, request_headers)

File "/tmp/8dc81ac377ae252/app.py", line 321, in send_chat_request

raise e

File "/tmp/8dc81ac377ae252/app.py", line 316, in send_chat_request

raw_response = await azure_openai_client.chat.completions.with_raw_response.create(**model_args)

File "/tmp/8dc81ac377ae252/antenv/lib/python3.11/site-packages/openai/_response.py", line 262, in wrapped

return cast(APIResponse[R], await func(*args, **kwargs))

File "/tmp/8dc81ac377ae252/antenv/lib/python3.11/site-packages/openai/resources/chat/completions.py", line 1295, in create

return await self._post(

File "/tmp/8dc81ac377ae252/antenv/lib/python3.11/site-packages/openai/_base_client.py", line 1536, in post

return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)

File "/tmp/8dc81ac377ae252/antenv/lib/python3.11/site-packages/openai/_base_client.py", line 1315, in request

return await self._request(

File "/tmp/8dc81ac377ae252/antenv/lib/python3.11/site-packages/openai/_base_client.py", line 1392, in _request

raise self._make_status_error_from_response(err.response) from None

--

I suppose there is a mess in app deployment manifest or something like that

Appreciate any advice

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,433 questions
{count} votes