public class ChatGptApiPost extends Object implements PostApiService
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
AUTHORIZATION_ERROR |
static String |
AUTHORIZATION_ERROR_MSG |
static String |
BIZ_ERROR |
static String |
JSON_ERROR |
static String |
JSON_ERROR_MSG |
static String |
OTHER_ERROR |
| 构造器和说明 |
|---|
ChatGptApiPost(OpenAiAuth openAiAuth) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
CreditGrantsRes |
queryBillingCreditGrants()
Billing credit grants
|
public ChatGptApiPost(OpenAiAuth openAiAuth)
public ModelRes models() throws ApiException
PostApiServicemodels 在接口中 PostApiServiceApiException - public ModelDataRes model(String modelName) throws ApiException
PostApiServicemodel 在接口中 PostApiServicemodelName - modelApiException - public CompletionRes completions(CompletionReq req) throws ApiException
PostApiServicecompletions 在接口中 PostApiServicereq - reqApiException - public void completionsStream(CompletionReq req, Callback<CompletionRes> callback)
PostApiServicecompletionsStream 在接口中 PostApiServicereq - reqcallback - callback funcationpublic CompletionRes completionsChat(CompletionReq req) throws ApiException
PostApiServicecompletionsChat 在接口中 PostApiServicereq - reqApiException - public void completionsChatStream(CompletionReq req, Callback<CompletionRes> callback)
PostApiServicecompletionsChatStream 在接口中 PostApiServicereq - reqcallback - callback funcationpublic CompletionRes completionsEdit(CompletionReq req) throws ApiException
PostApiServicecompletionsEdit 在接口中 PostApiServicereq - reqApiException - public ImageRes imageCreate(ImageReq req) throws ApiException
PostApiServiceimageCreate 在接口中 PostApiServicereq - reqApiException - public ImageRes imageEdit(ImageReq req) throws ApiException
PostApiServiceimageEdit 在接口中 PostApiServicereq - reqApiException - public ImageRes imageVariate(ImageReq req) throws ApiException
PostApiServiceimageVariate 在接口中 PostApiServicereq - reqApiException - public EmbeddingsRes embeddingsCreate(EmbeddingsReq req) throws ApiException
PostApiServiceembeddingsCreate 在接口中 PostApiServicereq - reqApiException - public AudioRes audioTranscribes(AudioReq req) throws ApiException
PostApiServiceaudioTranscribes 在接口中 PostApiServicereq - reqApiException - public AudioRes audioTranslates(AudioReq req) throws ApiException
PostApiServiceaudioTranslates 在接口中 PostApiServicereq - reqApiException - public FileListRes fileList() throws ApiException
PostApiServicefileList 在接口中 PostApiServiceApiException - public FileDetRes fileUpload(FileReq req) throws ApiException
PostApiServicefileUpload 在接口中 PostApiServicereq - reqApiException - public ObjDelRes fileDelete(String fileId) throws ApiException
PostApiServicefileDelete 在接口中 PostApiServicefileId - The ID of the file to use for this requestApiException - public FileDetRes fileRetrieve(String fileId) throws ApiException
PostApiServicefileRetrieve 在接口中 PostApiServicefileId - The ID of the file to use for this requestApiException - public String fileRetrieveContent(String fileId) throws ApiException
PostApiServicefileRetrieveContent 在接口中 PostApiServicefileId - The ID of the file to use for this requestApiException - public FineTunesRes fineTuneCreate(FineTunesReq req) throws ApiException
PostApiServicefineTuneCreate 在接口中 PostApiServicereq - reqApiException - public FineTuneListRes fineTuneList() throws ApiException
PostApiServicefineTuneList 在接口中 PostApiServiceApiException - public FineTunesRes fineTuneRetrieve(String fineTuneId) throws ApiException
PostApiServicefineTuneRetrieve 在接口中 PostApiServicefineTuneId - The ID of the fine-tune job to get events for.ApiException - public FineTunesRes fineTuneCancel(String fineTuneId) throws ApiException
PostApiServicefineTuneCancel 在接口中 PostApiServicefineTuneId - The ID of the fine-tune job to get events for.ApiException - public EventListRes fineTuneEventList(String fineTuneId) throws ApiException
PostApiServicefineTuneEventList 在接口中 PostApiServicefineTuneId - The ID of the fine-tune job to get events for.ApiException - public ObjDelRes fineTuneDelete(String model) throws ApiException
PostApiServicefineTuneDelete 在接口中 PostApiServicemodel - The model to deleteApiException - public ModerationsRes moderationsCreate(ModerationsReq req) throws ApiException
PostApiServicemoderationsCreate 在接口中 PostApiServicereq - reqApiException - public EnginesListRes enginesList() throws ApiException
PostApiServiceenginesList 在接口中 PostApiServiceApiException - public EnginesDataRes enginesRetrieve(String engineId) throws ApiException
PostApiServiceenginesRetrieve 在接口中 PostApiServiceengineId - The ID of the engine to use for this requestApiException - public CreditGrantsRes queryBillingCreditGrants() throws ApiException
PostApiServicequeryBillingCreditGrants 在接口中 PostApiServiceApiException - Copyright © 2023. All rights reserved.