8000 fix: add binding for name in ChatCompletionRequestToolMessage by JDScript · Pull Request #1407 · abetlen/llama-cpp-python · GitHub
[go: up one dir, main page]

Skip to content

fix: add binding for name in ChatCompletionRequestToolMessage #1407

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JDScript
Copy link

Follow issue #1405

@abetlen
Copy link
Owner
abetlen commented Apr 30, 2024

@JDScript I'm not sure that's correct based on the OpenAI OpenAPI spec here

@JDScript
Copy link
Author
JDScript commented May 2, 2024

Yeah, but I checked the document here, under Example invoking multiple function calls in one response. Examples given by OpenAI also adds the name parameter, which is the same as in the examples/notebooks/Functions.ipynb. Therefore, I used an optional binding.

@pseudorandomrants
Copy link

Any update on this? I am facing same issue while using functionary.

@allenporter
Copy link
allenporter commented Jul 15, 2024

This does not seem like the correct fix.

I see this message when specifying a message "role": "tool" and if its missing a name. so you can workaround with another role e.g. system if missing a name

@allenporter
Copy link

Also discussed here openai/openai-python#1078

I see, the tool role template is expecting a name in the chat template:

So a name needs to be populated from somewhere, or the tool role can't be used.

@allenporter
Copy link

Perhaps we have to get it by looking at the history of tool calls with the same tool id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0