Class AiOperationsWrapper
java.lang.Object
com.aispect.core.engine.runtime.context.AiOperationsWrapper
- All Implemented Interfaces:
AiOperations
AiOperations wrapper, belongs torunning phase (Runtime)Responsibilities.
When calling a method, if Agent Configured on the annotation modelName,
then inject the model name into subsequent AI Calling,
Implement method-level model overrides without modifying the original AiOperations accomplish.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExpose underlying bindingsAiClientClient adapter instance.prompt(String overrideModel, String agentName, PromptContext context) Manually initiate a synchronization AI Prompt word call with model name override.promptStream(String overrideModel, String agentName, PromptContext context) Manually initiate a streaming AI Prompt word call with model name override.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.aispect.api.AiOperations
prompt, prompt, promptStream, promptStream
-
Constructor Details
-
AiOperationsWrapper
-
-
Method Details
-
prompt
public Response prompt(String overrideModel, String agentName, PromptContext context) throws AiSpectException Description copied from interface:AiOperationsManually initiate a synchronization AI Prompt word call with model name override.- Specified by:
promptin interfaceAiOperations- Parameters:
overrideModel- Preferred model name (overrides global default configuration)agentName- Agentnamecontext- Prompt context for this request- Returns:
- return AI Non-streaming response results for the model
- Throws:
AiSpectException- Any exception during model call
-
promptStream
public Stream<Response> promptStream(String overrideModel, String agentName, PromptContext context) throws AiSpectException Description copied from interface:AiOperationsManually initiate a streaming AI Prompt word call with model name override.- Specified by:
promptStreamin interfaceAiOperations- Parameters:
overrideModel- Preferred model name (overrides global default configuration)agentName- Agentnamecontext- Prompt context for this request- Returns:
- Return response stream
- Throws:
AiSpectException- Any exception during model call
-
getClient
Description copied from interface:AiOperationsExpose underlying bindingsAiClientClient adapter instance.For advanced developers to directly perform some platform-specific high-level API operations (such as model-specific fine-tuning request, etc.).
- Specified by:
getClientin interfaceAiOperations- Returns:
- Unified adaptation client injected by the bottom layer
-