Skip to content
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

Function calling was broken #471

Closed
saaldigital-cw opened this issue Jan 4, 2024 · 1 comment · Fixed by #463
Closed

Function calling was broken #471

saaldigital-cw opened this issue Jan 4, 2024 · 1 comment · Fixed by #463
Labels
Ready for next version This issue solved and waiting for next release
Milestone

Comments

@saaldigital-cw
Copy link

saaldigital-cw commented Jan 4, 2024

Describe the bug
After the latest update of the Function calling... i don't get it run again ... am i missing something?

Your code piece

var completion = _openAiService.ChatCompletion.CreateCompletionAsStream(req, cancellationToken: cancellationToken);
await foreach (var resultData in completion) {
	counter += 1;
   if (resultData.Choices != null) {
	var choice = resultData.Choices.FirstOrDefault();
	tokenData = choice.Message.Content;
	//choice.
	if (choice.Message.ToolCalls!=null) {
		bool functionCallingComplete = false;
				
		foreach (var toolCall in choice.Message.ToolCalls) {							
		   var fn = toolCall.FunctionCall;
			if (fn != null) {
// fn.Arguments IS ALWAYS empty
}

Result
I have no arguments for the function call so i cannot use the updated version

@David-Buyer
Copy link
Contributor

Look at this if it could be helpful:

#459

@kayhantolga kayhantolga added this to the 7.4.5 milestone Jan 30, 2024
@kayhantolga kayhantolga added the Ready for next version This issue solved and waiting for next release label Jan 31, 2024
@kayhantolga kayhantolga linked a pull request Jan 31, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for next version This issue solved and waiting for next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants