Skip to content

models chat with wikipedia

github-actions[bot] edited this page Aug 11, 2023 · 15 revisions

chat-with-wikipedia

Overview

Description: # Chat With Wikipedia This is a companion flow to "Ask Wikipedia". It demonstrates how to create a chatbot that can remember previous interactions and use the conversation history to generate next message. ## What you will learn In this flow, you will learn - how to compose a chat flow. - prompt template format of LLM tool chat api. Message delimiter is a separate line containing role name and colon: "system:", "user:", "assistant:". See OpenAI Chat for more about message role. jinja system: You are a chatbot having a conversation with a human. user: {{question}} - how to consume chat history in prompt. jinja {% for item in chat_history %} user: {{item.inputs.question}} assistant: {{item.outputs.answer}} {% endfor %} ## Getting started ### 1 Create connection for LLM tool to use Go to "Prompt flow" "Connections" tab. Click on "Create" button, select one of LLM tool supported connection types and fill in the configurations. Currently, there are two connection types supported by LLM tool: "AzureOpenAI" and "OpenAI". If you want to use "AzureOpenAI" connection type, you need to create an Azure OpenAI service first. Please refer to Azure OpenAI Service for more details. If you want to use "OpenAI" connection type, you need to create an OpenAI account first. Please refer to OpenAI for more details. ### 2 Configure the flow with your connection Click "Clone" button to start a new flow, and go to nodes "extract_query_from_question" and "augmented_chat". Pick the connection you created in step 1 in the node parameter "Connection" dropdown list. ### 3 Start chatting Click "Chat" button to open the chat window. Type in your question and click "Send" button. The chatbot will reply with an answer. You can continue chatting with the chatbot by typing in your next question and click "Send" button again. ## Used tools - LLM Tool - Python Tool

Version: 1

View in Studio: https://ml.azure.com/registries/azureml/models/chat-with-wikipedia/version/1

Properties

SHA: 1937544adcceef984626626e2d7e679a156b9c0d

is-promptflow: true

inference-min-sku-spec: 4|0|28|32

inference-recommended-sku: Standard_DS5_v2

Clone this wiki locally