public interface PostApiService
| 限定符和类型 | 方法和说明 |
|---|---|
AudioRes |
audioTranscribes(AudioReq req)
Create transcription
Transcribes audio into the input language. |
AudioRes |
audioTranslates(AudioReq req)
Create translation
Translates audio into into English. |
CompletionRes |
completions(CompletionReq req)
Create completion
Creates a completion for the provided prompt and parameters stream = false |
CompletionRes |
completionsChat(CompletionReq req)
Create chat completion
Creates a completion for the chat message stream = false |
void |
completionsChatStream(CompletionReq req,
Callback<CompletionRes> callback)
Create chat completion
Creates a completion for the chat message stream = true |
CompletionRes |
completionsEdit(CompletionReq req)
Create edit
Creates a new edit for the provided input, instruction, and parameters. |
void |
completionsStream(CompletionReq req,
Callback<CompletionRes> callback)
Create completion
Creates a completion for the provided prompt and parameters stream = true |
EmbeddingsRes |
embeddingsCreate(EmbeddingsReq req)
Create embeddings
Creates an embedding vector representing the input text. |
EnginesListRes |
enginesList()
List engines
Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability. |
EnginesDataRes |
enginesRetrieve(String engineId)
Retrieve engine
Retrieves a model instance, providing basic information about it such as the owner and availability. |
ObjDelRes |
fileDelete(String fileId)
Delete file
Delete a file. |
FileListRes |
fileList()
List files
Returns a list of files that belong to the user's organization. |
FileDetRes |
fileRetrieve(String fileId)
Retrieve file
Returns information about a specific file. |
String |
fileRetrieveContent(String fileId)
Retrieve file content
Returns the contents of the specified file. |
FileDetRes |
fileUpload(FileReq req)
Upload file
Upload a file that contains document(s) to be used across various endpoints/features. |
FineTunesRes |
fineTuneCancel(String fineTuneId)
Cancel fine-tune
Immediately cancel a fine-tune job. |
FineTunesRes |
fineTuneCreate(FineTunesReq req)
Create fine-tune
Creates a job that fine-tunes a specified model from a given dataset. |
ObjDelRes |
fineTuneDelete(String model)
Delete fine-tune model
Delete a fine-tuned model. |
EventListRes |
fineTuneEventList(String fineTuneId)
List fine-tune events
Get fine-grained status updates for a fine-tune job. |
FineTuneListRes |
fineTuneList()
List fine-tunes
List your organization's fine-tuning jobs. |
FineTunesRes |
fineTuneRetrieve(String fineTuneId)
Retrieve fine-tune
Gets info about the fine-tune job. |
ImageRes |
imageCreate(ImageReq req)
Create image
Creates an image given a prompt. |
ImageRes |
imageEdit(ImageReq req)
Create image edit
Creates an edited or extended image given an original image and a prompt. |
ImageRes |
imageVariate(ImageReq req)
Create image variation
Creates a variation of a given image. |
ModelDataRes |
model(String modelName)
Retrieve model
Retrieves a model instance, providing basic information about the model such as the owner and permissioning. |
ModelRes |
models()
List models
Lists the currently available models, and provides basic information about each one such as the owner and availability. |
ModerationsRes |
moderationsCreate(ModerationsReq req)
Create moderation
Classifies if text violates OpenAI's Content Policy |
ModelRes models() throws ApiException
ApiException - ModelDataRes model(String modelName) throws ApiException
modelName - modelApiException - CompletionRes completions(CompletionReq req) throws ApiException
req - reqApiException - void completionsStream(CompletionReq req, Callback<CompletionRes> callback) throws ApiException
req - reqcallback - callback funcationApiException - CompletionRes completionsChat(CompletionReq req) throws ApiException
req - reqApiException - void completionsChatStream(CompletionReq req, Callback<CompletionRes> callback) throws ApiException
req - reqcallback - callback funcationApiException - CompletionRes completionsEdit(CompletionReq req) throws ApiException
req - reqApiException - ImageRes imageCreate(ImageReq req) throws ApiException
req - reqApiException - ImageRes imageEdit(ImageReq req) throws ApiException
req - reqApiException - ImageRes imageVariate(ImageReq req) throws ApiException
req - reqApiException - EmbeddingsRes embeddingsCreate(EmbeddingsReq req) throws ApiException
req - reqApiException - AudioRes audioTranscribes(AudioReq req) throws ApiException
req - reqApiException - AudioRes audioTranslates(AudioReq req) throws ApiException
req - reqApiException - FileListRes fileList() throws ApiException
ApiException - FileDetRes fileUpload(FileReq req) throws ApiException
req - reqApiException - ObjDelRes fileDelete(String fileId) throws ApiException
fileId - The ID of the file to use for this requestApiException - FileDetRes fileRetrieve(String fileId) throws ApiException
fileId - The ID of the file to use for this requestApiException - String fileRetrieveContent(String fileId) throws ApiException
fileId - The ID of the file to use for this requestApiException - FineTunesRes fineTuneCreate(FineTunesReq req) throws ApiException
req - reqApiException - FineTuneListRes fineTuneList() throws ApiException
ApiException - FineTunesRes fineTuneRetrieve(String fineTuneId) throws ApiException
fineTuneId - The ID of the fine-tune job to get events for.ApiException - FineTunesRes fineTuneCancel(String fineTuneId) throws ApiException
fineTuneId - The ID of the fine-tune job to get events for.ApiException - EventListRes fineTuneEventList(String fineTuneId) throws ApiException
fineTuneId - The ID of the fine-tune job to get events for.ApiException - ObjDelRes fineTuneDelete(String model) throws ApiException
model - The model to deleteApiException - ModerationsRes moderationsCreate(ModerationsReq req) throws ApiException
req - reqApiException - EnginesListRes enginesList() throws ApiException
ApiException - EnginesDataRes enginesRetrieve(String engineId) throws ApiException
engineId - The ID of the engine to use for this requestApiException - Copyright © 2023. All rights reserved.