openai-java
openai-java copied to clipboard
whisper
Can use whisper-1 using this library if yes how .
You might be able to try the new Stream feature w/ the whisper model. I think it might have to be split out into a new completion though given the media types--though the image return is just bytes typed to a class.
Oh, I just checked, it's a different endpoint, so it'll have to be supported in the code.
curl https://api.openai.com/v1/audio/transcriptions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F model="whisper-1" \
-F file="@/path/to/file/openai.mp3"
@cryptoapebot can send me example
So it looks like the endpoint takes an audio, multipart file and then returns the text. That should be easy to handle by just calling the right endpoint which isn't supported in this API just yet.
@cryptoapebot thanks, and are you know about gpt 4 ?
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, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301
If you are signed in or have your key through Postman, you can find their model cards here: https://api.openai.com/v1/models
@cryptoapebot its use same api thats use in gpt 3.5 but different in model ?
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