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

[Chat completion API] Support tools and tool_choice

Open Tudor44 opened this issue 1 year ago • 5 comments

See #424 for original issue request.

Thanks.

Tudor44 avatar Dec 13 '23 13:12 Tudor44

Nice. Thanks. The unit test looks a bit lengthy. Just saying.

terryyin avatar Dec 14 '23 02:12 terryyin

Nice. Thanks. The unit test looks a bit lengthy. Just saying.

Sure, I have simplified a bit the test.

Tudor44 avatar Dec 14 '23 07:12 Tudor44

Hi all, is this PR being reviewed? will it be merged soon? I have a project that uses it to access the OpenAI-compatible Anyscale (anyscale.com). Regular chat completion works just fine, but function calling doesn't work. It does work on the real OpenAI. Also, function calling works on Anyscale when using the Python openai library.

The reason is that the Anyscale, which has OpenAI-compatible API probably doesn't support the deprecated function calling syntax.

I verified that the Python code uses the new syntax (tools, tool_choice), while openai-java uses the old one (functions, function_call).

the-gigi avatar Jan 24 '24 18:01 the-gigi

Hi all, is this PR being reviewed? will it be merged soon? I have a project that uses it to access the OpenAI-compatible Anyscale (anyscale.com). Regular chat completion works just fine, but function calling doesn't work. It does work on the real OpenAI. Also, function calling works on Anyscale when using the Python openai library.

The reason is that the Anyscale, which has OpenAI-compatible API probably doesn't support the deprecated function calling syntax.

I verified that the Python code uses the new syntax (tools, tool_choice), while openai-java uses the old one (functions, function_call).

HI @the-gigi ,

this project seems to be not more maintained. If you are interested you can review my fork and use it, let me know in case of difficulties.

Tudor44 avatar Jan 24 '24 20:01 Tudor44

The owner of this project has no activities in 2024.... @Tudor44

swumao avatar Feb 21 '24 06:02 swumao