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

Chat Completion Seed: Double instead of integer #35

Open Dustinhoefer opened 4 months ago

Dustinhoefer commented 4 months ago

The official API states:

seed integer or null Optional If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.

Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.

In your implementation you are using Double. Was this a change in the api or is this intentional?

Dustinhoefer commented 4 months ago

Using the seed the following error is also returned:

Unsuccessful response with HTTP status code 400 and error body: { "error": { "message": "1710180280865.0 is not of type 'integer' - 'seed'", "type": "invalid_request_error", "param": null, "code": null } }

In the ChatCompletionRequest it is a Double, in the CompletionRequest an Integer :D