-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat: Add Chat Generator supporting OpenAI Responses API #9808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 19115469262Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
…tack into openai-responses
releasenotes/notes/add-openai-responses-chatgenerator-52ca7457a4e61db1.yaml
Show resolved
Hide resolved
|
We discussed with @Amnah199 about Function tool call We considered two possible solutions:
Since I'll be on PTO next week, feel free to merge this PR when it's ready. |
|
@sjrl Would love your input here. However, if that’s unlikely (or a definite no), I can try to make the first option work instead. Context: Here’s the commit showing what the first approach might look like. |
I like the idea of adding the |
| Data that is sent to Posthog for usage analytics. | ||
| """ | ||
| return {"model": self.model} | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make sure to add a warm_up function that looks like
def warm_up(self):
"""
Warm up the Azure OpenAI chat generator.
This will warm up the tools registered in the chat generator.
This method is idempotent and will only warm up the tools once.
"""
if not self._is_warmed_up:
warm_up_tools(self.tools)
self._is_warmed_up = Truealso make sure to add self._is_warmed_up = False to the init method. This change is related to this PR #9942
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
Related Issues
Proposed Changes:
responsesendpoint.initandrunmethods allows openai and MCP tools besides haystack Tools.text_formatingeneration_kwargs.generation_kwargs.backgroundrequests etc, which are not supported in this iteration.How did you test it?
Notes for the reviewer
Using OpenAI tools and MCP tools doesn’t behave like standard function calls.
type="function_call". However, for OpenAI/MCP tools, the type value varies depending on the tool being used — for example,type="web_search_call".ResponseFunctionToolCallobjects. As a result, tool calls from OpenAI/MCP tools won’t appear in theChatMessage, so the user won’t see them.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.