Hi all! I am trying to use Azure models in the playground. I've double checked everything on my end and it all seems correct. However, When I hit Run in the Playground the Output returns 'NoneType' object has no attribute 'content' My colleague ran into the same issue independently. Let me know if any additional information would be helpful and I can provide it. Or if there is a better place to report an issue such as this.
Perhaps the API Version is not supported? We're on 2024-02-15-preview
Thanks Michael H.. Can you send the full stacktrace from the server? Feel free to DM me if it contains sensitive information.
Also, the query used to replicate the bug would be helpful. Also feel free to DM or strip of sensitive content.
Hi Xander. Thanks. Don't have access to the server stacktrace. Here's the Payload and Response. Payload
{
"operationName": "PlaygroundOutputSubscription",
"variables": {
"input": {
"messages": [
{"content": "You are a chatbot", "role": "SYSTEM"},
{"content": "Hello!", "role": "USER"}
],
"model": {
"providerKey": "AZURE_OPENAI",
"name": "gpt-4o-2024-08-06",
"endpoint": "https://azure-openai-810874.openai.azure.com/",
"apiVersion": "2024-02-15-preview"
},
"invocationParameters": [
{"invocationName": "temperature", "valueFloat": 0},
{"invocationName": "top_p", "valueFloat": 1},
{"invocationName": "max_tokens", "valueInt": 3000},
{"invocationName": "seed", "valueInt": 1},
{"invocationName": "frequency_penalty", "valueFloat": 0},
{"invocationName": "presence_penalty", "valueFloat": 0}
],
"template": {
"format": "MUSTACHE",
"variables": {}
},
"apiKey": "REDACTED_FOR_SECURITY"
}
},
"query": "subscription PlaygroundOutputSubscription($input: ChatCompletionInput!) { chatCompletion(input: $input) { __typename ... on TextChunk { content } ... on ToolCallChunk { id function { name arguments } } ... on ChatCompletionSubscriptionResult { span { id } } ... on ChatCompletionSubscriptionError { message } } }"
}
Response
--graphql
Content-Type: application/json
{}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": ""}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": "Hello"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": "!"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": " How"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": " can"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": " I"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": " assist"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": " you"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": " today"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "TextChunk", "content": "?"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "ChatCompletionSubscriptionError", "message": "'NoneType' object has no attribute 'content'"}}}}
--graphql
Content-Type: application/json
{"payload": {"data": {"chatCompletion": {"__typename": "ChatCompletionSubscriptionResult", "span": {"id": "U3BhbjozODQ4MDg="}}}}}
--graphql--Thanks Michael H.. Are you using Phoenix Cloud or self-hosting?
Thanks. I'll try to reproduce locally, but may need to take a peek at your server logs if I am unable to reproduce. Do you mind sharing your email used for registering with Phoenix Cloud? DM is okay.
Michael H. Can you test out disabling the streaming toggle? We made some changes recently with the underlying transport for streaming and want to rule out that the issue you are experiencing with related to streaming.
Oh I didn't even notice the stream option. I see it now. No change. Would have expected to see it in the payload.
{"query":"mutation PlaygroundOutputMutation(\n $input: ChatCompletionInput!\n) {\n chatCompletion(input: $input) {\n __typename\n content\n errorMessage\n span {\n id\n }\n toolCalls {\n id\n function {\n name\n arguments\n }\n }\n }\n}\n","variables":{"input":{"messages":[{"content":"You are a chatbot","role":"SYSTEM"},{"content":"Hello","role":"USER"}],"model":{"providerKey":"AZURE_OPENAI","name":"gpt-4o-2024-05-13","endpoint":"https://azure-openai-810874.openai.azure.com/","apiVersion":"2024-02-15-preview"},"invocationParameters":[{"canonicalName":"TEMPERATURE","invocationName":"temperature","valueFloat":0},{"canonicalName":null,"invocationName":"frequency_penalty","valueFloat":0},{"canonicalName":null,"invocationName":"presence_penalty","valueFloat":0},{"canonicalName":"TOP_P","invocationName":"top_p","valueFloat":1},{"invocationName":"seed","canonicalName":"RANDOM_SEED","valueInt":1},{"invocationName":"max_tokens","canonicalName":"MAX_COMPLETION_TOKENS","valueInt":3000}],"apiKey":"","template":{"variables":{},"format":"MUSTACHE"}}}}
{
"data": {
"chatCompletion": {
"__typename": "ChatCompletionMutationPayload",
"content": null,
"errorMessage": "'NoneType' object has no attribute 'content'",
"span": {
"id": "U3BhbjozODg2NjM="
},
"toolCalls": []
}
}
}Out of curiosity, what happens if you remove the trailing slash from your endpoint? So instead of https://azure-openai-810874.openai.azure.com/ , just https://azure-openai-810874.openai.azure.com
Hey Michael H., this is a bit of a puzzler on our end. I've filed an issue [here](https://github.com/Arize-ai/phoenix/issues/7351). I don't seem able to reproduce the issue you're hitting. I think it's unlikely to be related to your API version for Azure. We'll try to improve logging on our end and may need your help to trigger the bug.
Hey Michael H., are you able to reproduce the issue when running Phoenix locally? You can install Phoenix with pip install arize-phoenix and then phoenix serve, which will spin up the app on localhost:6006
