feat(model/openairesponse): 新增 OpenAI Responses API ChatModel 组件,兼容adk目前chatmodel类型#758
Open
ywandy wants to merge 4 commits intocloudwego:mainfrom
Open
feat(model/openairesponse): 新增 OpenAI Responses API ChatModel 组件,兼容adk目前chatmodel类型#758ywandy wants to merge 4 commits intocloudwego:mainfrom
ywandy wants to merge 4 commits intocloudwego:mainfrom
Conversation
Author
|
@shentongmartin 麻烦合并下哈 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
详细描述
en:
This PR introduces a new
openairesponsepackage undercomponents/model, which implements the einoToolCallingChatModelinterface based on the OpenAI Responses API (/v1/responsesendpoint), backed bygithub.com/openai/openai-go/v3.Key features:
ResponsesAPIChatModel: supports bothGenerate(non-streaming) andStream(streaming) invocation via the Responses API.WithTools, with fullToolChoicecontrol (auto / none / required / specific tool).web_searchtool via config or per-call option (EnableWebSearch).text,json_object, andjson_schemaoutput formats.zh:
本 PR 在
components/model下新增openairesponse包,基于 OpenAI Responses API(/v1/responses端点)实现了 eino 的ToolCallingChatModel接口,底层使用github.com/openai/openai-go/v3SDK。主要特性:
ResponsesAPIChatModel,支持Generate(非流式)和Stream(流式)两种调用方式。WithTools绑定自定义函数工具,完整支持ToolChoice(auto / none / required / 指定工具名)。EnableWebSearch)开启 OpenAI 内置web_search工具。text、json_object、json_schema三种输出格式。关联 Issue
无
用户文档 PR
无