Class CodeMieProvider.OpenAIProviderExtension
java.lang.Object
org.machanism.machai.ai.provider.AbstractAIProvider
org.machanism.machai.ai.provider.impl.OpenAIProvider
org.machanism.machai.ai.provider.impl.CodeMieProvider.OpenAIProviderExtension
- All Implemented Interfaces:
EmbeddingProvider,Genai
- Enclosing class:
- CodeMieProvider
OpenAI 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.OpenAIProvider
inputs, logger, OPENAI_API_KEY, OPENAI_BASE_URL_NAME, toolMapFields 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
ConstructorsModifierConstructorDescriptionprivateOpenAIProviderExtension(String username, String resolvedAuthUrl, String password) Creates an OpenAI extension with the credentials used for token refresh. -
Method Summary
Modifier and TypeMethodDescriptioncom.openai.client.OpenAIClientRefreshes the access token and creates the configured OpenAI client.Methods inherited from class org.machanism.machai.ai.provider.impl.OpenAIProvider
addMcpServer, addTool, addWebSearch, captureUsage, clear, embedding, 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, setTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.machanism.machai.ai.provider.EmbeddingProvider
init
-
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
-
OpenAIProviderExtension
Creates an OpenAI extension with the credentials used for token refresh.
-
-
Method Details
-
getClient
public com.openai.client.OpenAIClient getClient()Refreshes the access token and creates the configured OpenAI client.- Overrides:
getClientin classOpenAIProvider- Returns:
- OpenAI client
-