Commit Graph

3 Commits

Author SHA1 Message Date
CaoPengFlying
e8b347891b fix:fix open ai original validation. modify Tool's Function to pointer (#664)
Co-authored-by: caopengfei1 <caopengfei1@tal.com>
2024-02-19 16:26:04 +04:00
mikeb26
a09cb0c528 Add completion-with-tool example (#598)
As a user of this go SDK it was not immediately intuitive to me how to
correctly utilize the function calling capability of GPT4
(https://platform.openai.com/docs/guides/function-calling). While the
aformentioned link provides a helpful example written in python, I
initially tripped over how to correclty translate the specification of
function arguments when usingthis go SDK.

To make it easier for others in the future this commit adds a
completion-with-tool example showing how to correctly utilize the
function calling capability of GPT4 using this SDK end-to-end in a
CreateChatCompletion() sequence.
2023-11-26 12:45:28 +04:00
Hoani Bryson
5f4ff3ebfa Add Readme example to example_test.go (#298)
* Add speech to text example in docs

* Add caption formats for audio transcription

* Add caption example to README

* Address sanity check errors

* Add tests for decodeResponse

* Use typechecker for audio response format

* Decoding response refactors

* Migrated examples to example_test.go

* Add some executable examples

* Update error docs

* Avoid linting example files which break conventions

* Restore README examples

* Enable linting for example_test
2023-05-08 20:16:01 +04:00