Class CodeMieProvider.ClaudeProviderExtension
java.lang.Object
org.machanism.machai.ai.provider.AbstractAIProvider
org.machanism.machai.ai.provider.impl.AnthropicProvider
org.machanism.machai.ai.provider.impl.CodeMieProvider.ClaudeProviderExtension
- All Implemented Interfaces:
Genai
- Enclosing class:
- CodeMieProvider
Anthropic provider extension that refreshes the CodeMie access token.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringPassword or client secret supplied to the token endpoint.private final StringToken endpoint used to obtain the access token.private final StringUser name supplied to the CodeMie token endpoint.Fields inherited from class org.machanism.machai.ai.provider.impl.AnthropicProvider
ANTHROPIC_API_KEY, ANTHROPIC_BASE_URLFields inherited from class org.machanism.machai.ai.provider.AbstractAIProvider
chatModel, DEFAULT_WEBSEARCH_TYPE_NAME, ERROR_TOOL_RESULT_PREFIX, instructions, LINE_SEPARATOR, LOG_LINE_LENG, MAX_OUTPUT_TOKENS, maxOutputTokens, maxToolCalls, MCP_PROP_NAME_PREFIX, PARAGRAPH_SEPARATOR, PASSWORD_PROP_NAME, PROJECT_DIR_PARAM_NAME, projectDir, timeoutSec, USERNAME_PROP_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateClaudeProviderExtension(String username, String resolvedAuthUrl, String password) Creates an Anthropic extension with the credentials used for token refresh. -
Method Summary
Modifier and TypeMethodDescriptionprotected com.anthropic.client.AnthropicClientRefreshes the access token and creates the configured Anthropic client.Methods inherited from class org.machanism.machai.ai.provider.impl.AnthropicProvider
addMcpServer, addTool, addWebSearch, clear, perform, promptMethods inherited from class org.machanism.machai.ai.provider.AbstractAIProvider
addMcpServers, addPrompt, addPrompts, addResource, addResources, addTools, addWebSearch, getConfigurator, getEnabledTools, getParamValue, getProjectDir, getTimeout, init, instructions, isErrorHandling, normalize, safelyInvokeTool, setEnabledTools, setErrorHandling, setProjectDir, setTimeout
-
Field Details
-
username
User name supplied to the CodeMie token endpoint. -
resolvedAuthUrl
Token endpoint used to obtain the access token. -
password
Password or client secret supplied to the token endpoint.
-
-
Constructor Details
-
ClaudeProviderExtension
Creates an Anthropic extension with the credentials used for token refresh.
-
-
Method Details
-
getClient
protected com.anthropic.client.AnthropicClient getClient()Refreshes the access token and creates the configured Anthropic client.- Overrides:
getClientin classAnthropicProvider
-