-
Notifications
You must be signed in to change notification settings - Fork 12
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
adding the OpenAIFunctionCaller #14
Conversation
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
Pull Request Test Coverage Report for Build 9513906991Details
💛 - Coveralls |
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.
Took a first pass, this will be tricky to serialize but doable
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Massimiliano Pippi <[email protected]>
Co-authored-by: Massimiliano Pippi <[email protected]>
Co-authored-by: Madeesh Kannan <[email protected]>
Pull Request Test Coverage Report for Build 9548401674Warning: 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 |
Pull Request Test Coverage Report for Build 9548404389Warning: 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 |
Pull Request Test Coverage Report for Build 9548413341Warning: 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 |
Pull Request Test Coverage Report for Build 9548912053Warning: 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 |
Pull Request Test Coverage Report for Build 9549551101Warning: 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 |
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Massimiliano Pippi <[email protected]>
Co-authored-by: Massimiliano Pippi <[email protected]>
Co-authored-by: Massimiliano Pippi <[email protected]>
Pull Request Test Coverage Report for Build 9550535764Warning: 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 |
Pull Request Test Coverage Report for Build 9550533685Warning: 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 |
Pull Request Test Coverage Report for Build 9550537322Warning: 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 |
Pull Request Test Coverage Report for Build 9551129065Warning: 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 |
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.
Good on my side
Pull Request Test Coverage Report for Build 9560403086Warning: 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 |
Pull Request Test Coverage Report for Build 9560720590Warning: 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 |
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Madeesh Kannan <[email protected]>
Pull Request Test Coverage Report for Build 9563066747Warning: 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 |
haystack_experimental/components/tools/openai/function_caller.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Massimiliano Pippi <[email protected]>
…haystack-experimental into feat/function-caller
Pull Request Test Coverage Report for Build 9563287676Warning: 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 |
Pull Request Test Coverage Report for Build 9564264800Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9564511117Details
💛 - Coveralls |
Proposed Changes:
I propose adding this
OpenAIFunctionCaller
component that is able to accept a list of ChatMessages, and run a function if there were anytool_calls
within these messages.Some simple guardrails that have been added:
If the tool/function name in the message that we get doesn't actually exist (hallucinated) , the component returns an assistant message indicating as such.
How did you test it?
Manual tests. Here is the pipeline I'm using:
Notes for the reviewer
You can try this pipeline here
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.