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 ClaudeChatResponse |
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 ClaudeChatResponse |
chatCompletions(OpenAiChatRequest chatRequestVo) |
static okhttp3.Call |
chatCompletions(OpenAiChatRequest chatRequestVo,
okhttp3.Callback callback) |
static okhttp3.Response |
chatCompletions(String bodyString) |
static okhttp3.Call |
chatCompletions(String bodyString,
okhttp3.Callback callback) |
static ClaudeChatResponse |
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 ClaudeChatResponse |
chatCompletions(String model,
OpenAiChatMessage chatMessage) |
static ClaudeChatResponse |
chatCompletions(String apiKey,
OpenAiChatRequest chatRequestVo) |
static okhttp3.Call |
chatCompletions(String apiKey,
OpenAiChatRequest chatRequestVo,
okhttp3.Callback callback) |
static okhttp3.sse.EventSource |
chatCompletions(String apiKey,
OpenAiChatRequest chatRequestVo,
okhttp3.sse.EventSourceListener listener) |
static okhttp3.Response |
chatCompletions(String apiKey,
String bodyString) |
static ClaudeChatResponse |
chatCompletions(String model,
String systemPrompt,
List<OpenAiChatMessage> messages) |
static ClaudeChatResponse |
chatCompletions(String apiPerfixUrl,
String apiKey,
OpenAiChatRequest chatRequestVo) |
static okhttp3.Call |
chatCompletions(String serverUrl,
String apiKey,
OpenAiChatRequest chatRequestVo,
okhttp3.Callback callback) |
static okhttp3.sse.EventSource |
chatCompletions(String apiPerfixUrl,
String apiKey,
OpenAiChatRequest chatRequest,
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 ClaudeChatResponse |
chatCompletions(String apiUrl,
String key,
String model,
List<OpenAiChatMessage> messages) |
static ClaudeChatResponse |
chatCompletions(String apiUrl,
String key,
String model,
OpenAiChatMessage chatMessage) |
static ClaudeChatResponse |
chatWithImage(String prompt,
byte[] bytes,
String suffix) |
static ClaudeChatResponse |
chatWithImage(String apiKey,
String prompt,
byte[] bytes,
String suffix) |
static ClaudeChatResponse |
chatWithImage(String apiKey,
String model,
String prompt,
byte[] bytes,
String suffix) |
static ClaudeChatResponse |
chatWithModel(String model,
String role,
String prompt) |
static ClaudeChatResponse |
chatWithModel(String key,
String model,
String role,
String prompt) |
static ClaudeChatResponse |
chatWithModel(String apiUrl,
String key,
String model,
String role,
String prompt) |
static ClaudeChatResponse |
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 ClaudeChatResponse chatCompletions(String model, OpenAiChatMessage chatMessage)
model - chatMessage - public static ClaudeChatResponse chatCompletions(String model, List<OpenAiChatMessage> messages)
public static ClaudeChatResponse chatCompletions(String model, String systemPrompt, List<OpenAiChatMessage> messages)
public static ClaudeChatResponse chatCompletions(String apiKey, OpenAiChatRequest chatRequestVo)
apiKey - chatRequestVo - public static ClaudeChatResponse chatCompletions(OpenAiChatRequest chatRequestVo)
chatRequestVo - public static okhttp3.Call chatCompletions(OpenAiChatRequest chatRequestVo, okhttp3.Callback callback)
chatRequestVo - callback - public static ClaudeChatResponse chatCompletions(String apiPerfixUrl, String apiKey, OpenAiChatRequest 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, OpenAiChatRequest chatRequest, 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, OpenAiChatRequest chatRequestVo, okhttp3.Callback callback)
public static okhttp3.sse.EventSource chatCompletions(String apiKey, OpenAiChatRequest chatRequestVo, okhttp3.sse.EventSourceListener listener)
public static okhttp3.Call chatCompletions(String serverUrl, String apiKey, OpenAiChatRequest 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 ClaudeChatResponse chat(String prompt)
role - prompt - public static ClaudeChatResponse chatWithRole(String role, String prompt)
role - prompt - public static ClaudeChatResponse chatWithModel(String model, String role, String prompt)
model - role - prompt - public static ClaudeChatResponse chatWithModel(String key, String model, String role, String prompt)
public static ClaudeChatResponse chatWithModel(String apiUrl, String key, String model, String role, String prompt)
public static ClaudeChatResponse chatCompletions(String apiUrl, String key, String model, OpenAiChatMessage chatMessage)
public static ClaudeChatResponse 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 ClaudeChatResponse chatWithImage(String prompt, byte[] bytes, String suffix)
public static ClaudeChatResponse chatWithImage(String apiKey, String model, String prompt, byte[] bytes, String suffix)
public static ClaudeChatResponse chatWithImage(String apiKey, String prompt, byte[] bytes, String suffix)
Copyright © 2026. All rights reserved.