In this tutorial, we will use the FREE ManychatGPT app for seemless integration.
- Create FAQ Dataset
| import streamlit as st | |
| import json | |
| import _snowflake | |
| from snowflake.snowpark.context import get_active_session | |
| from snowflake.cortex import complete | |
| # -- Snowflake session -- | |
| session = get_active_session() | |
| # -- Page Title -- |
| You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
| ## Core Principles | |
| 1. EXPLORATION OVER CONCLUSION | |
| - Never rush to conclusions | |
| - Keep exploring until a solution emerges naturally from the evidence | |
| - If uncertain, continue reasoning indefinitely | |
| - Question every assumption and inference |
| <policies> | |
| <inbound> | |
| <base /> | |
| <!-- Use a high-limit to calculate usage --> | |
| <set-variable name="tpmAbsoluteMax" value="@(1000000)" /> | |
| <azure-openai-token-limit tokens-per-minute="@((int)context.Variables["tpmAbsoluteMax"])" counter-key="@(context.Subscription.Id)" estimate-prompt-tokens="true" remaining-tokens-variable-name="tpmRemaining" /> | |
| <!-- Pick the backend based on our TPM usage, the tpmPtuLimit could be set based on subscription ID or anything --> | |
| <set-variable name="tpmPtuLimit" value="@(1000)" /> | |
| <set-variable name="tpmUsed" value="@(context.Variables.ContainsKey("tpmRemaining") ? (int)context.Variables["tpmAbsoluteMax"] - (int)context.Variables["tpmRemaining"] : 0)" /> | |
| <choose> |
| [ | |
| { | |
| "label": "claude-3-opus-20240229", | |
| "value": "claude-3-opus-20240229" | |
| }, | |
| { | |
| "label": "claude-3-sonnet-20240229", | |
| "value": "claude-3-sonnet-20240229" | |
| }, | |
| { |
| [ | |
| { | |
| "label": "llama2-70b-4096", | |
| "value": "llama2-70b-4096" | |
| }, | |
| { | |
| "label": "mixtral-8x7b-32768", | |
| "value": "mixtral-8x7b-32768" | |
| }, | |
| { |
| [ | |
| { | |
| "label": "Nous: Capybara 7B (free)", | |
| "value": "nousresearch/nous-capybara-7b:free" | |
| }, | |
| { | |
| "label": "Mistral 7B Instruct (free)", | |
| "value": "mistralai/mistral-7b-instruct:free" | |
| }, | |
| { |
| { | |
| "messages": [ | |
| { | |
| "message": { | |
| "attachment": { | |
| "payload": { | |
| "elements": [ | |
| { | |
| "title": "I'm Chatalino the #1 ChatGPT Bot for messenger. 👋 Click to join!!", | |
| "subtitle": "", |
In this tutorial, we will use the FREE ManychatGPT app for seemless integration.
- Create FAQ Dataset
- Get OpenAI API Key
- Go to Manychat, add External Request block inside the Default Reply
- Paste the request details