public class OpenAiClient extends Object
| 构造器和说明 |
|---|
OpenAiClient() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ChatResponseVo |
chat(String prompt) |
static okhttp3.Response |
chatCompletions(Map<String,String> header,
String bodyString) |
static okhttp3.Call |
chatCompletions(Map<String,String> header,
String bodyString,
okhttp3.Callback callback) |
static ChatResponseVo |
chatCompletions(OpenAiChatRequestVo chatRequestVo) |
static okhttp3.Call |
chatCompletions(OpenAiChatRequestVo chatRequestVo,
okhttp3.Callback callback) |
static okhttp3.Response |
chatCompletions(String bodyString) |
static okhttp3.Call |
chatCompletions(String bodyString,
okhttp3.Callback callback) |
static ChatResponseVo |
chatCompletions(String model,
ChatMessage chatMessage) |
static okhttp3.Response |
chatCompletions(String uri,
Map<String,String> requestHeaders,
String bodyString) |
static okhttp3.Call |
chatCompletions(String apiPrefixUrl,
Map<String,String> requestHeaders,
String bodyString,
okhttp3.Callback callback) |
static ChatResponseVo |
chatCompletions(String apiKey,
OpenAiChatRequestVo chatRequestVo) |
static okhttp3.Response |
chatCompletions(String apiKey,
String bodyString) |
static ChatResponseVo |
chatCompletions(String apiPerfixUrl,
String apiKey,
OpenAiChatRequestVo chatRequestVo) |
static okhttp3.Call |
chatCompletions(String serverUrl,
String apiKey,
OpenAiChatRequestVo chatRequestVo,
okhttp3.Callback callback) |
static okhttp3.Response |
chatCompletions(String apiPerfixUrl,
String apiKey,
String bodyString) |
static okhttp3.Call |
chatCompletions(String apiPerfixUrl,
String apiKey,
String bodyString,
okhttp3.Callback callback) |
static ChatResponseVo |
chatWithImage(String prompt,
byte[] bytes,
String suffix) |
static ChatResponseVo |
chatWithImage(String apiKey,
String prompt,
byte[] bytes,
String suffix) |
static ChatResponseVo |
chatWithModel(String model,
String role,
String prompt) |
static ChatResponseVo |
chatWithRole(String role,
String prompt) |
static float[] |
embeddingArray(String input) |
static float[] |
embeddingArray(String input,
String model) |
static float[] |
embeddingArray(String serverUrl,
String apiKey,
EmbeddingRequestVo reqVo) |
static float[] |
embeddingArray(String serverUrl,
String input,
String model) |
static float[] |
embeddingArray(String serverUrl,
String apiKey,
String input,
String model) |
static float[] |
embeddingArrayByLargeModel(String input) |
static EmbeddingResponseVo |
embeddings(EmbeddingRequestVo embeddingRequestVo) |
static okhttp3.Response |
embeddings(String bodyString) |
static EmbeddingResponseVo |
embeddings(String apiKey,
EmbeddingRequestVo reoVo) |
static okhttp3.Response |
embeddings(String apiKey,
String bodyString) |
static EmbeddingResponseVo |
embeddings(String serverUrl,
String apiKey,
EmbeddingRequestVo reoVo) |
static okhttp3.Response |
embeddings(String api_perfix_url,
String apiKey,
String bodyString) |
public static okhttp3.Response chatCompletions(String apiKey, String bodyString)
apiKey - bodyString - public static okhttp3.Response chatCompletions(Map<String,String> header, String bodyString)
header - bodyString - public static okhttp3.Response chatCompletions(String bodyString)
bodyString - public static okhttp3.Call chatCompletions(String bodyString, okhttp3.Callback callback)
bodyString - callback - public static okhttp3.Call chatCompletions(Map<String,String> header, String bodyString, okhttp3.Callback callback)
header - bodyString - callback - public static ChatResponseVo chatCompletions(String model, ChatMessage chatMessage)
model - chatMessage - public static ChatResponseVo chatCompletions(String apiKey, OpenAiChatRequestVo chatRequestVo)
apiKey - chatRequestVo - public static ChatResponseVo chatCompletions(OpenAiChatRequestVo chatRequestVo)
chatRequestVo - public static okhttp3.Call chatCompletions(OpenAiChatRequestVo chatRequestVo, okhttp3.Callback callback)
chatRequestVo - callback - public static ChatResponseVo chatCompletions(String apiPerfixUrl, String apiKey, OpenAiChatRequestVo chatRequestVo)
apiPerfixUrl - apiKey - chatRequestVo - public static okhttp3.Response chatCompletions(String apiPerfixUrl, String apiKey, String bodyString)
apiPerfixUrl - apiKey - bodyString - public static okhttp3.Call chatCompletions(String apiPerfixUrl, String apiKey, String bodyString, okhttp3.Callback callback)
apiPerfixUrl - apiKey - bodyString - callback - public static okhttp3.Response chatCompletions(String uri, Map<String,String> requestHeaders, String bodyString)
uri - requestHeaders - bodyString - public static okhttp3.Call chatCompletions(String serverUrl, String apiKey, OpenAiChatRequestVo chatRequestVo, okhttp3.Callback callback)
serverUrl - apiKey - chatRequestVo - callback - public static okhttp3.Call chatCompletions(String apiPrefixUrl, Map<String,String> requestHeaders, String bodyString, okhttp3.Callback callback)
apiPrefixUrl - requestHeaders - bodyString - callback - public static ChatResponseVo chat(String prompt)
role - prompt - public static ChatResponseVo chatWithRole(String role, String prompt)
role - prompt - public static ChatResponseVo chatWithModel(String model, String role, String prompt)
model - role - prompt - public static okhttp3.Response embeddings(String bodyString)
public static okhttp3.Response embeddings(String api_perfix_url, String apiKey, String bodyString)
public static float[] embeddingArray(String input)
public static float[] embeddingArrayByLargeModel(String input)
public static EmbeddingResponseVo embeddings(EmbeddingRequestVo embeddingRequestVo)
public static EmbeddingResponseVo embeddings(String serverUrl, String apiKey, EmbeddingRequestVo reoVo)
public static EmbeddingResponseVo embeddings(String apiKey, EmbeddingRequestVo reoVo)
public static float[] embeddingArray(String serverUrl, String apiKey, String input, String model)
public static float[] embeddingArray(String serverUrl, String apiKey, EmbeddingRequestVo reqVo)
public static ChatResponseVo chatWithImage(String prompt, byte[] bytes, String suffix)
public static ChatResponseVo chatWithImage(String apiKey, String prompt, byte[] bytes, String suffix)
Copyright © 2024. All rights reserved.