openai.beta.question

Element details

type: meya.openai.beta.component.question
class: OpenaiQuestionComponent
path: /meya/openai/beta/component/question.py
signature: question

Fields

fielddescription               requiredsignaturedefaulttype
specOverride the original spec for this element.nullSpec
contextSend context data with this component's event.{}
dict
sensitiveMark this component's event as sensitive. This will encrypt the event if the Sensitive Data integration has been enabled.falsebool
triggersActivate these dynamic triggers when the component runs. Check the component triggers guide for more info.[]list
quick_repliesList of buttons that the user can select for replies.[]list
composerOverride the Orb composer for this component.focus:
placeholder:
collapse_placeholder:
visibility:
character_limit:
ComposerElementSpec
headerOverride the header for this component.buttons:
title:
progress:
milestones:
extra_buttons:
HeaderElementSpec
markdownOverride the bot Markdown mode for this component. Check the Markdown guide for more info.nulllist
bool
NoneType
integrationReference path to the OpenAi integration element to use for this question/answer response.OpenaiIntegrationRef
questionThe question text that is being asked.str
max_tokensThe maximum number of tokens to generate in the completion.The token count of your prompt plus max_tokens cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).The question text that is being asked.250int
min_content_chunksThe minimum number of chunks to include in the prompt template context.2int
max_content_chunksThe maximum number of chunks to return from the content index that are most similar to the given question. The more chunks added to the context the better the response will be.
Note that this is dependent on the chunk size, and chunks will be automatically truncated to fit within the model's maximum token limit.
5int
min_event_historyThe minimum number of say events to include in the prompttemplate context.2int
max_event_historyThe maximum number of say events to return from the event history to include in the prompt template context.
For GPT-3.5 chat models, the event history is automatically prepended to the prompt's messages. Set this to 0 to disable.
Note that the event history will automatically be truncated to fit within the model's maximum token limit.
20int
api_timeoutThe maximum number of seconds to wait for a response from the OpenAI API. If not set, the default timeout of 30 seconds will be used.nullReal

Usage reference

Basic

triggers:
  - keyword: meya.openai.beta.component.question
steps:
  - integration: integration.openai
    question: STRING

Full

triggers:
  - keyword: meya.openai.beta.component.question
steps:
  - spec:
      type: STRING
      data:
        STRING: ANY
      timeout: 123
      trigger_when: ANY
    context:
      STRING: ANY
    sensitive: false
    triggers:
      - type: STRING
        data:
          STRING: ANY
        timeout: 123
        trigger_when: ANY
    quick_replies:
      - url: STRING
        javascript: STRING
        button_id: STRING
        context:
          STRING: ANY
        default: false
        disabled: false
        divider: false
        icon:
          url: STRING
          color: STRING
          path: STRING
        action: COMPONENT
        value: ANY
        result: ANY
        data:
          STRING: ANY
        magic: false
        type: text|url|static|menu|divider|action|flow_next|component_next
        menu:
          - BUTTONELEMENTSPEC
        text: STRING
    composer:
      focus: file|image|text|blur
      placeholder: STRING
      collapse_placeholder: STRING
      visibility: collapse|hide|show
      character_limit:
        length: 123
        error_text: STRING
    header:
      buttons:
        - url: STRING
          javascript: STRING
          button_id: STRING
          context:
            STRING: ANY
          default: false
          disabled: false
          divider: false
          icon:
            url: STRING
            color: STRING
            path: STRING
          action: COMPONENT
          value: ANY
          result: ANY
          data:
            STRING: ANY
          magic: false
          type: text|url|static|menu|divider|action|flow_next|component_next
          menu:
            - BUTTONELEMENTSPEC
          text: STRING
      title:
        text: STRING
        icon:
          url: STRING
          color: STRING
          path: STRING
      progress:
        value: 123
        show_percent: false
      milestones:
        - text: STRING
          current: false
      extra_buttons:
        - url: STRING
          javascript: STRING
          button_id: STRING
          context:
            STRING: ANY
          default: false
          disabled: false
          divider: false
          icon:
            url: STRING
            color: STRING
            path: STRING
          action: COMPONENT
          value: ANY
          result: ANY
          data:
            STRING: ANY
          magic: false
          type: text|url|static|menu|divider|action|flow_next|component_next
          menu:
            - BUTTONELEMENTSPEC
          text: STRING
    markdown:
      - format|linkify|breaks|typographer
    integration: integration.openai
    question: STRING
    max_tokens: 123
    min_content_chunks: 123
    max_content_chunks: 123
    min_event_history: 123
    max_event_history: 123
    api_timeout: 123