agentscope-ai / agentscope-ai/agentscope-java

[Bug]: Agentscope will throw an error when OpenAI model providers' services are missing certain non-essential fields.

Open
#157 2 comments 0 reactions 0 assignees View on GitHub
area/core/model bug
Dominant language
Java
Stars
5.6k
Forks
1.3k
Avg merge
4d 12h
Merged PRs (30d)
77

Description

Some model providers may omit certain parameters in their responses, which can cause Agentscope to throw an error.

Note: Some response parameters are not exposed as they are not relevant to IdeaLab. The specific differences are as follows:

id, object, created, model, system_fingerprint: not provided
choices: consistent with OpenAI, but logprobs is omitted when null
usage: consistent with OpenAI

Exception:

Caused by: com.openai.errors.OpenAIInvalidDataException: `id` is not set
at com.openai.core.JsonField.getRequired$openai_java_core(Values.kt:174)
at com.openai.models.chat.completions.ChatCompletionChunk.id(ChatCompletionChunk.kt:76)

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.