go-openai icon indicating copy to clipboard operation
go-openai copied to clipboard

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

Open Evan-master opened this issue 1 year ago • 6 comments

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 avatar Feb 04 '24 10:02 Evan-master

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

Guaderxx avatar Feb 05 '24 07:02 Guaderxx

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

sullrich avatar Feb 06 '24 15:02 sullrich

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

Evan-master avatar Feb 08 '24 03:02 Evan-master

That's ok. Which example you failed.

Guaderxx avatar Feb 08 '24 04:02 Guaderxx

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

Evan-master avatar Feb 10 '24 14:02 Evan-master

我调用老是出现这个错误是为啥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.

niuweiming avatar May 28 '24 12:05 niuweiming