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

Could someone please provide me with an example of the go language version using function call to call the api #653

Open
Evan-master opened this issue Feb 4, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@Evan-master
Copy link

Could someone please provide me with an example of the go language version using function call to call the api,i donn't know how to do that

@Evan-master Evan-master added the enhancement New feature or request label Feb 4, 2024
@Guaderxx
Copy link

Guaderxx commented Feb 5, 2024

@sullrich
Copy link

sullrich commented Feb 6, 2024

Could someone help flush out a parallel function call example? This code will fail if the model requests multiple function calls.

@Evan-master
Copy link
Author

https://github.com/sashabaranov/go-openai/tree/master/examples

thanks,bro,I have tried to use the code of example, but my function call calls the external api, and the code example in example does not allow me to call successfully

@Guaderxx
Copy link

Guaderxx commented Feb 8, 2024

That's ok. Which example you failed.

@Evan-master
Copy link
Author

That's ok. Which example you failed.
I just don't know how to use tools. For example, I have many external apis, and I hope to use openai to use function call to automatically call the functions I write (including multiple apis).I just need an example of a function call that calls the external interface API

@niuweiming
Copy link

我调用老是出现这个错误是为啥ChatCompletion error: Post "https://api.openai.com/v1/chat/completions": dial tcp 128.242.240.253:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

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

No branches or pull requests

4 participants