Unleashing the Power of AI: Virtual Agent Chat with ServiceNow

Find AI Tools
No difficulty
No complicated process
Find ai tools

Unleashing the Power of AI: Virtual Agent Chat with ServiceNow

Table of Contents

  1. Introduction
  2. Obtaining the API Key for Open AI Chat
  3. Configuring the REST Message
  4. Utilizing the Open AI Util Class
  5. Setting Up the Virtual Agent Topic
  6. Interacting with the Virtual Agent
  7. System Properties for API Key and Model
  8. Exploring the Jarvis Open AI Application
  9. Accessing the Virtual Agent in the Service Portal
  10. Examples of Conversations with Open AI

Introduction

In this article, we will explore the process of configuring open AI chat with the virtual agent chat in Service Portal. We will cover various aspects such as obtaining the API key, configuring the REST message, leveraging the Open AI Util Class, setting up the virtual agent topic, and interacting with the virtual agent. Additionally, we will discuss the system properties for the API key and model, explore the Jarvis Open AI application, and provide examples of conversations with Open AI.

1. Obtaining the API Key for Open AI Chat

To configure open AI chat, the first step is to obtain the API key for Open AI. Sign up for Open AI and Create a new secret key, which will serve as the API key. Save and store the API key securely for later use.

2. Configuring the REST Message

In ServiceNow Studio, navigate to the REST message configuration. Open the REST message for completions, which represents the endpoint for communication with Open AI. Review the HTTP method, endpoint, and other documentation available through the making request URL.

3. Utilizing the Open AI Util Class

To call the Open AI web service and communicate with the API, we will leverage the Open AI Util Class. This class provides necessary functions to run the REST message through the endpoint, using the POST method. The API key should be provided in the authorization URL, and the completion settings and model can be configured accordingly.

4. Setting Up the Virtual Agent Topic

Create a new topic in the virtual agent and name it "Jarvis Open AI". This topic will handle conversations with Open AI. Define the flow of the topic, starting with user input and greetings. After receiving user questions or information, trigger the web service to communicate with Open AI and wait for a response.

5. Interacting with the Virtual Agent

In the virtual agent topic, display the response from Open AI in the chat window. Provide an option for the user to exit the conversation and wait for the next input. If the user types "exit", the conversation will end. If the user asks another question, send that question to the Open AI endpoint to receive another response. If no response is received, end the conversation with a farewell message.

6. System Properties for API Key and Model

Two system properties need to be configured: API key and API model. Enter the obtained API key in the API key system property. By default, the API model is set to "text DaVinci 003". For different models, refer to the provided URL for model information.

7. Exploring the Jarvis Open AI Application

In the ServiceNow platform view, locate the Jarvis Open AI application in the left navigator. Access the settings within the application to enter the API key and model. These settings are essential for the integration with Open AI.

8. Accessing the Virtual Agent in the Service Portal

Open the Service Portal and click on the open chat window. Load the virtual agent, named "Jarvis". Click on "Show me everything" to view available topics. Select the "Jarvis Open AI" topic to initiate the conversation. Initially, the virtual agent will greet the user and ask for their questions or information.

9. Examples of Conversations with Open AI

During the interaction with the virtual agent, users can ask questions related to various topics. For troubleshooting Outlook connection issues, ask for assistance. For VPN errors, Inquire about access not granted. Users can also request guidance for changing internet proxy settings. Open AI can help with technical queries and provide Relevant instructions. Additionally, Open AI can answer general knowledge questions such as the states part of Route 66 or the top five YouTubers and their earnings.

Highlights

  • Configure open AI chat with the virtual agent in Service Portal
  • Obtain and securely store the API key for Open AI
  • Configure the REST message settings to communicate with Open AI
  • Utilize the Open AI Util Class for calling the web service
  • Set up the virtual agent topic and define the conversation flow
  • Access the virtual agent in the Service Portal with the Jarvis application
  • Have conversations with Open AI on various topics

FAQ

Q: How do I obtain the API key for Open AI chat? A: Sign up for Open AI and create a new secret key, which will serve as the API key.

Q: Can I change the default API model? A: Yes, the API model can be changed by modifying the corresponding system property.

Q: What Type of questions can I ask the virtual agent with AI? A: Users can ask troubleshooting questions, technical queries, or general knowledge inquiries.

Q: How secure is the API key for Open AI chat? A: The API key should be stored securely to prevent unauthorized access and misuse.

Most people like

Are you spending too much time looking for ai tools?
App rating
4.9
AI Tools
100k+
Trusted Users
5000+
WHY YOU SHOULD CHOOSE TOOLIFY

TOOLIFY is the best ai tool source.

Browse More Content