openai.beta.question

Element details

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

Fields

field

description

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

required

signature

default

type

spec

Override the original spec for this element.

null

Spec

context

Send context data with this component's event.

{}

dict

sensitive

Mark this component's event as sensitive. This will encrypt the event if the Sensitive Data integration has been enabled.

false

bool

triggers

Activate these dynamic triggers when the component runs. Check the component triggers guide for more info.

[]

list

quick_replies

List of buttons that the user can select for replies.

[]

list

composer

Override the Orb composer for this component.

focus:
placeholder:
collapse_placeholder:
visibility:
character_limit:

ComposerElementSpec

header

Override the header for this component.

buttons:
title:
progress:
milestones:
extra_buttons:

HeaderElementSpec

markdown

Override the bot Markdown mode for this component. Check the Markdown guide for more info.

null

list
bool
NoneType

integration

Reference path to the OpenAi integration element to use for this question/answer response.

OpenaiIntegrationRef

question

The question text that is being asked.

str

max_tokens

The 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.

250

int

min_content_chunks

The minimum number of chunks to include in the prompt template context.

2

int

max_content_chunks

The 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.

5

int

min_event_history

The minimum number of say events to include in the prompttemplate context.

2

int

max_event_history

The 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.

20

int

api_timeout

The 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.

null

Real

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