namankhurpia / Easy-open-ai

This repository contains the community-maintained library for OpenAI's API in java, the easiest way to use GPT 3/4 in your applications.
http://namank.xyz
MIT License
15 stars 3 forks source link

Using .topP leads to error #36

Closed Dustinhoefer closed 6 months ago

Dustinhoefer commented 6 months ago

io.github.namankhurpia.Pojo.ChatCompletion.ChatCompletionRequest request = io.github.namankhurpia.Pojo.ChatCompletion.ChatCompletionRequest.builder() .model("gpt-4-turbo-preview") .messages(messages) .temperature(1.0d) .topP(1.0d) .seed(value) .build();

Unsuccessful response with HTTP status code 400 and error body: { "error": { "message": "Unrecognized request argument supplied: topP", "type": "invalid_request_error", "param": null, "code": null } }

Dustinhoefer commented 6 months ago

The parameter is called "top_p"

namankhurpia commented 6 months ago

@Dustinhoefer thanks for mentioning this, this is fixed in PR#37

https://github.com/namankhurpia/Easy-open-ai/pull/37