cryptoapebot
cryptoapebot
Yes, if you have access to it, which I think they provide now, you can just use one of these in the models field w/ the existing OpenAIService. gpt-4, gpt-4-0314,...
I know this is listed as completed, but documenting it here for future reference. You have to use the /v1/chat/completions, not the /v1/completions. Which means completion of type: ChatCompletionRequest
If you look at @n3bul4 comment above, he was having issues w/ flushing the stream?
> Could someone please provide an example of how to utilize this? https://github.com/TheoKanning/openai-java/blob/main/example/src/main/java/example/OpenAiApiStreamExample.java You might have to add: import java.time.Duration; And when you create the service. OpenAiService service = new...
Just a note, I don't think streaming is mean to be a time saving feature. It can start delivering partial results to a user quicker for better UX so there...
There is a new feature recently that does support using a proxy. There is an example in the README that works. Please make sure you are on the latest version,...
If you have access to it, you can use it now just by putting the right value into .model() https://platform.openai.com/docs/models/gpt-4 Just for the record I DO NOT have access.
Not sure what you are asking. openai-java is the java toolkit for calling the OpenAI apis within a Java program. For calling the API without this toolkit including using CURL...
POST https://api.openai.com/v1/chat/completions Authorization: Bearer sk-...... Content-Type: application/json Body: ``` { "model": "gpt-4", "messages": [{"role": "user", "content": "Hello!"}] } ``` Confirmed works in Curl and Postman.
Looks okay to me. Will try to recreate error w/ your code. Do you have the exact termination notice warning?