public class ClaudeClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLAUDE_API_KEY |
static String |
CLAUDE_API_URL |
static boolean |
debug |
| Constructor and Description |
|---|
ClaudeClient() |
| Modifier and Type | Method and Description |
|---|---|
static ClaudeChatResponseVo |
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 ClaudeChatResponseVo |
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 ClaudeChatResponseVo |
chatCompletions(String model,
List<OpenAiChatMessage> messages) |
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 okhttp3.sse.EventSource |
chatCompletions(String apiPrefixUrl,
Map<String,String> requestHeaders,
String bodyString,
okhttp3.sse.EventSourceListener listener) |
static ClaudeChatResponseVo |
chatCompletions(String model,
OpenAiChatMessage chatMessage) |
static ClaudeChatResponseVo |
chatCompletions(String apiKey,
OpenAiChatRequestVo chatRequestVo) |
static okhttp3.Call |
chatCompletions(String apiKey,
OpenAiChatRequestVo chatRequestVo,
okhttp3.Callback callback) |
static okhttp3.sse.EventSource |
chatCompletions(String apiKey,
OpenAiChatRequestVo chatRequestVo,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.Response |
chatCompletions(String apiKey,
String bodyString) |
static ClaudeChatResponseVo |
chatCompletions(String model,
String systemPrompt,
List<OpenAiChatMessage> messages) |
static ClaudeChatResponseVo |
chatCompletions(String apiPerfixUrl,
String apiKey,
OpenAiChatRequestVo chatRequestVo) |
static okhttp3.Call |
chatCompletions(String serverUrl,
String apiKey,
OpenAiChatRequestVo chatRequestVo,
okhttp3.Callback callback) |
static okhttp3.sse.EventSource |
chatCompletions(String apiPerfixUrl,
String apiKey,
OpenAiChatRequestVo chatRequestVo,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.Response |
chatCompletions(String apiPerfixUrl,
String apiKey,
String bodyString) |
static okhttp3.Call |
chatCompletions(String apiPerfixUrl,
String apiKey,
String bodyString,
okhttp3.Callback callback) |
static okhttp3.sse.EventSource |
chatCompletions(String apiPerfixUrl,
String apiKey,
String bodyString,
okhttp3.sse.EventSourceListener listener) |
static ClaudeChatResponseVo |
chatCompletions(String apiUrl,
String key,
String model,
List<OpenAiChatMessage> messages) |
static ClaudeChatResponseVo |
chatCompletions(String apiUrl,
String key,
String model,
OpenAiChatMessage chatMessage) |
static ClaudeChatResponseVo |
chatWithImage(String prompt,
byte[] bytes,
String suffix) |
static ClaudeChatResponseVo |
chatWithImage(String apiKey,
String prompt,
byte[] bytes,
String suffix) |
static ClaudeChatResponseVo |
chatWithImage(String apiKey,
String model,
String prompt,
byte[] bytes,
String suffix) |
static ClaudeChatResponseVo |
chatWithModel(String model,
String role,
String prompt) |
static ClaudeChatResponseVo |
chatWithModel(String key,
String model,
String role,
String prompt) |
static ClaudeChatResponseVo |
chatWithModel(String apiUrl,
String key,
String model,
String role,
String prompt) |
static ClaudeChatResponseVo |
chatWithRole(String role,
String prompt) |
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 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 boolean debug
public static final String CLAUDE_API_URL
public static final String CLAUDE_API_KEY
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 ClaudeChatResponseVo chatCompletions(String model, OpenAiChatMessage chatMessage)
model - chatMessage - public static ClaudeChatResponseVo chatCompletions(String model, List<OpenAiChatMessage> messages)
public static ClaudeChatResponseVo chatCompletions(String model, String systemPrompt, List<OpenAiChatMessage> messages)
public static ClaudeChatResponseVo chatCompletions(String apiKey, OpenAiChatRequestVo chatRequestVo)
apiKey - chatRequestVo - public static ClaudeChatResponseVo chatCompletions(OpenAiChatRequestVo chatRequestVo)
chatRequestVo - public static okhttp3.Call chatCompletions(OpenAiChatRequestVo chatRequestVo, okhttp3.Callback callback)
chatRequestVo - callback - public static ClaudeChatResponseVo 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.sse.EventSource chatCompletions(String apiPerfixUrl, String apiKey, OpenAiChatRequestVo chatRequestVo, okhttp3.sse.EventSourceListener listener)
public static okhttp3.sse.EventSource chatCompletions(String apiPerfixUrl, String apiKey, String bodyString, okhttp3.sse.EventSourceListener listener)
public static okhttp3.Response chatCompletions(String uri, Map<String,String> requestHeaders, String bodyString)
uri - requestHeaders - bodyString - public static okhttp3.Call chatCompletions(String apiKey, OpenAiChatRequestVo chatRequestVo, okhttp3.Callback callback)
public static okhttp3.sse.EventSource chatCompletions(String apiKey, OpenAiChatRequestVo chatRequestVo, okhttp3.sse.EventSourceListener listener)
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 okhttp3.sse.EventSource chatCompletions(String apiPrefixUrl, Map<String,String> requestHeaders, String bodyString, okhttp3.sse.EventSourceListener listener)
public static ClaudeChatResponseVo chat(String prompt)
role - prompt - public static ClaudeChatResponseVo chatWithRole(String role, String prompt)
role - prompt - public static ClaudeChatResponseVo chatWithModel(String model, String role, String prompt)
model - role - prompt - public static ClaudeChatResponseVo chatWithModel(String key, String model, String role, String prompt)
public static ClaudeChatResponseVo chatWithModel(String apiUrl, String key, String model, String role, String prompt)
public static ClaudeChatResponseVo chatCompletions(String apiUrl, String key, String model, OpenAiChatMessage chatMessage)
public static ClaudeChatResponseVo chatCompletions(String apiUrl, String key, String model, List<OpenAiChatMessage> messages)
public static okhttp3.Response embeddings(String bodyString)
public static okhttp3.Response embeddings(String api_perfix_url, String apiKey, String bodyString)
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 ClaudeChatResponseVo chatWithImage(String prompt, byte[] bytes, String suffix)
public static ClaudeChatResponseVo chatWithImage(String apiKey, String model, String prompt, byte[] bytes, String suffix)
public static ClaudeChatResponseVo chatWithImage(String apiKey, String prompt, byte[] bytes, String suffix)
Copyright © 2025. All rights reserved.