Azure / Azure/azure-sdk-for-python

Azure AI Inference SDK fails to complete chat completion with gpt-4.1

未关闭
#40,539 4 条评论 0 个 reaction 已指派 1 人 已指派给 @trangevi 在 GitHub 查看
AI Model Inference Client customer-reported needs-team-attention question Service Attention
主要语言
Python
星标
5.6k
派生
3.4k
平均合并
2 天 2 小时
30 天内合并 PR
213

描述

- **Package Name**: azure-ai-inference
- **Package Version**: 1.0.0b9
- **Operating System**: Windows 11
- **Python Version**: 3.12.9

**Describe the bug**
Chat completion request fails with
> **ERROR:**
> JSONDecodeError: Expecting value: line 1 column 1 (char 0)

**To Reproduce**
Steps to reproduce the behavior:
```python
client = ChatCompletionsClient(
endpoint=endpoint,
credential=AzureKeyCredential(os.getenv("AZURE_OPENAI_API_KEY"))
)

response = client.complete(
messages=[
SystemMessage(content="You are a helpful assistant."),
UserMessage(content="Where is Zurich?")
],
model="gpt-4.1"
)
```

**Expected behavior**
Return the chat completion result

**Screenshots**
n/a

**Additional context**
This works fine with any other AOAI model, it only fails with gpt-4.1

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。