Class ImmediateContextStage

java.lang.Object
bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
bg.codexio.ai.openai.api.sdk.chat.ImmediateContextStage
All Implemented Interfaces:
RuntimeExecutor

public class ImmediateContextStage extends ChatConfigurationStage implements RuntimeExecutor
Synchronous context to choose between raw response or just a simple string answer.
  • Method Details

    • askRaw

      public bg.codexio.ai.openai.api.payload.chat.response.ChatMessageResponse askRaw(String... questions)
      Sends request to the OpenAI API.
      Parameters:
      questions - user supplied prompt
      Returns:
      raw ChatMessageResponse
    • ask

      public String ask(String... questions)
      Sends request to the OpenAI API.
      Parameters:
      questions - user supplied prompt
      Returns:
      string with the answer