OpenDialog Docs
opendialog.aiStart BuildingTalk to an expert
  • GETTING STARTED
    • Introduction
    • Getting ready
    • Billing and plans
    • Quick Start AI Agents
      • Quick Start AI Agent
      • The "Start from Scratch" AI Agent
        • Chat Management Conversation
        • Welcome Conversation
        • Topic Conversation
        • Global No Match Conversation
        • Supporting LLM Actions
        • Semantic Classifier: Query Classifier
      • A Process Handling AI Agent
  • STEP BY STEP GUIDES
    • AI Agent Creation Overview
    • Add a new topic of discussion
    • Use knowledge sources via RAG
    • Adding a structured conversation
    • Add a 3rd party integration
    • Test and tweak your AI Agent
    • Publish your AI Agent
  • CORE CONCEPTS
    • OpenDialog Approach
      • Designing Conversational AI Agents
    • OpenDialog Platform
      • Scenarios
        • Conversations
        • Scenes
        • Turns and intents
      • Language Services
      • OpenDialog Account Management
        • Creating and managing users
        • Deleting OpenDialog account
        • Account Security
    • OpenDialog Conversation Engine
    • Contexts and attributes
      • Contexts
      • Attributes
      • Attribute Management
      • Conditions and operators
      • Composite Attributes
  • CREATE AI APPLICATIONS
    • Designing your application
      • Conversation Design
        • Conversational Patterns
          • Introduction to conversational patterns
          • Building robust assistants
            • Contextual help
            • Restart
            • End chat
            • Contextual and Global No Match
            • Contextual FAQ
          • Openings
            • Anatomy of an opening
            • Transactional openings
            • Additional information
          • Authentication
            • Components
            • Example dialog
            • Using in OpenDialog
          • Information collection
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
          • Recommendations
            • Components
            • Example dialog
            • Additional information
          • Extended telling
            • Components
            • Example dialog
            • Additional information
          • Repair
            • Types of repair
            • User request not understood
            • Example dialog
            • Additional information
          • Transfer
            • Components
            • Example dialog
            • Additional information
          • Closing
            • Components
            • Example dialog
            • Using in OpenDialog
            • Additional information
        • Best practices
          • Use Case
          • Subject Matter Expertise
          • Business Goals
          • User needs
            • Primary research
            • Secondary research
            • Outcome: user profile
          • Assistant personality
          • Sample dialogs
          • Conversation structure
          • API Integration Capabilities
          • NLU modeling
          • Testing strategy
          • The team
            • What does a conversation designer do
          • Select resources
      • Message Design
        • Message editor
        • Constructing Messages
        • Message Conditions
        • Messages best practices
        • Subsequent Messages - Virtual Intents
        • Using Attributes in Messages
        • Using Markdown in messages
        • Message Types
          • Text Message
          • Image Message
          • Button Message
          • Date Picker Message
          • Audio Message
          • Form Message
          • Full Page Message
          • Conversation Handover message
          • Autocomplete Message
          • Address Autocomplete Message
          • List Message
          • Rich Message
          • Location Message
          • E-Sign Message
          • File Upload Message
          • Meta Messages
            • Progress Bar Message
          • Attribute Message
      • Webchat Interface design
        • Webchat Interface Settings
        • Webchat Controls
      • Accessibility
      • Inclusive design
    • Leveraging Generative AI
      • Language Services
        • Semantic Intent Classifier
          • OpenAI
          • Azure
          • Google Gemini
          • Output attributes
        • Retrieval Augmented Generation
        • Example-based intent classification [Deprecated]
      • Interpreters
        • Available interpreters
          • OpenDialog interpreter
          • Amazon Lex interpreter
          • Google Dialogflow
            • Google Dialogflow interpreter
            • Google Dialogflow Knowledge Base
          • OpenAI interpreter
        • Using a language service interpreter
        • Interpreter Orchestration
        • Troubleshooting interpreters
      • LLM Actions
        • OpenAI
        • Azure OpenAI
        • Output attributes
        • Using conversation history (memory) in LLM actions
        • LLM Action Analytics
    • 3rd party Integrations in your application
      • Webhook actions
      • Actions from library
        • Freshdesk Action
        • Send to Email Action
        • Set Attributes Action
      • Conversation Hand-off
        • Chatwoot
    • Previewing your application
    • Launching your application
    • Monitoring your application
    • Debugging your application
    • Translating your application
    • FAQ
    • Troubleshooting and Common Problems
  • Developing With OpenDialog
    • Integrating with OpenDialog
    • Actions
      • Webhook actions
      • LLM actions
    • WebChat
      • Chat API
      • WebChat authentication
      • User Tracking
      • Load Webchat within page Element
      • How to enable JavaScript in your browser
      • SDK
        • Methods
        • Events
        • Custom Components
    • External APIs
  • Release Notes
    • Version 3 Upgrade Guide
    • Release Notes
Powered by GitBook
On this page
  • Requirements
  • Create the OpenAI interpreter
  • Optional fields
  • Attributes Returned
  1. CREATE AI APPLICATIONS
  2. Leveraging Generative AI
  3. Interpreters
  4. Available interpreters

OpenAI interpreter

PreviousGoogle Dialogflow Knowledge BaseNextUsing a language service interpreter

Last updated 11 months ago

The OpenAI interpreter allows us to use OpenAI's models to perform text generation. This model does not classify intents or extract entities, if you require this functionality please see Language Services.

This interpreter will return a single intent with the name of OpenAIPrompt. It could also return no intents, which would cause a no match as described below.

Requirements

To use OpenAI's you'll need to with OpenAI. Once you are signed up, you'll need to via the "API keys" screen. You'll need to keep note of the generated API key for the next step.

Create the OpenAI interpreter

In your OpenDialog application, navigate to the desired scenario, and then the "Interpret" screen. Click the blue "Add new interpreter" button to begin creating the new interpreter. You will then see the following screen where you can give the interpreter a name and configure it. You will need to select the OpenAI option under "Interpreter Type".

Select the desired model from the list under "Model name". Paste the API key you generated previously into the "API token" field. You can also configure the confidence field to a value between 0 and 1, which will set the returned intent confidence. The "Prompt engineering" field allows you to configure the system prompt of the model. At this point you have filled in all the required fields, and will be able to validate the interpreter's connection in the "Check Interpreter Setup" component in the bottom right.

Optional fields

  • No-match response: This field allows you to specify a value that will cause the interpreter to return no matching intents. For example, you can configure the prompt to return "N/A" if the question isn't relevant, and then you can configure the No-match response field as "N/A". The interpreter would then not return the OpenAIPrompt which allows for a no-match (if no other interpreters match the intent).

  • Should left-hand whitespace and punctuation be trimmed from the response?: This field allows you to decide if the interpreter should remove any whitespace or punctuation from the left-hand side of the response. This can be useful for older models that are more focused on pure completitions rather than chat competitions.

Attributes Returned

There are several attributes that can be returned by this interpreter that need to be taken into consideration. Some of the data returned is not suitable for displaying to users of your conversational interface and messages should be constructed taking these into account.

+ gpt_response: This field holds the response message back from OpenAI. It should be used in messages back to the user where the response is successful and not moderated. It can be included in messages with standard OpenDialog Attribute annotation.

+ gpt_moderation_response: This holds debugging information about the nature of the moderation. It should not be reflected back to the user, but can be useful to see during development

+ gpt_quota_limit_response: As above, but refers specifically to a quote limit response

+ gpt_exception_response: As above, but refers to more generic exception data

+ is_gpt_response_moderated: A boolean attribute that signifies whether the response or request was moderated. In this case, gpt_response should not be shown to a user. Messages or intents can be filtered using

+ is_gpt_response_successful: A boolean attribute that signifies whether the request was successful or had an error during processing. In this case, gpt_response should not be shown to a user. Messages or intents can be filtered using

Max tokens
Temperature
Frequency penalty
Presence penalty
Top P
Number of generations per prompt
OpenDialog Conditions
OpenDialog Conditions
create an account
create an API key
The API keys screen in OpenAI.
Creating an OpenAI interpreter in OpenDialog.