Interface AiOperations

All Known Implementing Classes:
AiOperationsWrapper

public interface AiOperations
Exposed to developers for manual control AI Interactive basic service facade interface.

Although the framework mainly promotes the use of annotations and AOP Perform non-intrusive programming, but in some scenarios (such as inside the orchestrator, in customized code), developers still need to directly call the underlying LLM Or get the client currently mounted on the system, At this time, you can operate through this interface.

  • Method Details

    • prompt

      Response prompt(String modelName, String agentName, PromptContext context) throws AiSpectException
      Manually initiate a synchronization AI Prompt word call with model name override.
      Parameters:
      modelName - Preferred model name (overrides global default configuration)
      agentName - Agentname
      context - Prompt context for this request
      Returns:
      return AI Non-streaming response results for the model
      Throws:
      AiSpectException - Any exception during model call
    • prompt

      default Response prompt(PromptContext context) throws AiSpectException
      Manually initiate a synchronization AI Prompt word call.
      Parameters:
      context - Prompt context for this request
      Returns:
      return AI Non-streaming response results for the model
      Throws:
      AiSpectException - Any exception during model call
    • prompt

      default Response prompt(String agentName, PromptContext context) throws AiSpectException
      Manually initiate a synchronization AI Prompt word call with Agent Name so that the underlying layer can configure routing.
      Parameters:
      agentName - Agentname
      context - Prompt context for this request
      Returns:
      return AI Non-streaming response results for the model
      Throws:
      AiSpectException - Any exception during model call
    • promptStream

      Stream<Response> promptStream(String modelName, String agentName, PromptContext context) throws AiSpectException
      Manually initiate a streaming AI Prompt word call with model name override.
      Parameters:
      modelName - Preferred model name (overrides global default configuration)
      agentName - Agentname
      context - Prompt context for this request
      Returns:
      Return response stream
      Throws:
      AiSpectException - Any exception during model call
    • promptStream

      default Stream<Response> promptStream(PromptContext context) throws AiSpectException
      Manually initiate a streaming AI Prompt word call.
      Parameters:
      context - Prompt context for this request
      Returns:
      Returns the response stream, which will be automatically closed when all is generated.
      Throws:
      AiSpectException - Any exception during model call
    • promptStream

      default Stream<Response> promptStream(String agentName, PromptContext context) throws AiSpectException
      Manually initiate a streaming AI Prompt word call with Agent Name so that the underlying layer can configure routing.
      Parameters:
      agentName - Agentname
      context - Prompt context for this request
      Returns:
      Returns the response stream, which will be automatically closed when all is generated.
      Throws:
      AiSpectException - Any exception during model call
    • getClient

      AiClient getClient()
      Expose underlying bindings AiClient Client adapter instance.

      For advanced developers to directly perform some platform-specific high-level API operations (such as model-specific fine-tuning request, etc.).

      Returns:
      Unified adaptation client injected by the bottom layer