Spaces:
Running
Running
File size: 2,134 Bytes
2a51e7d 182c9d1 2a51e7d 0a8b0d4 38283be 2a51e7d 26de2cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
import os
from langchain_core.prompts import ChatPromptTemplate
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
MODEL_GROQ = "llama3-8b-8192" #"llama-3.1-8b-instant"
INDEX_NAME_XANO = "xano-index"
INDEX_NAME_WEWEB = "weweb-index"
CONFIG = {
"configurable" : {
"thread_id": "1234"
}
}
PROMPT = ChatPromptTemplate.from_messages(
[
(
"system",
"You are a knowledgeable instructor. Your job is to help students learn Xano and WeWeb, the data for which is retrieved from a documentation site"
"Answer the questions directly and clearly, as if you are explaining to students who need proper and structured guidance. Also, add website sources (Dont fake websites), if there are none, there is no need to include the source."
"If the answer doesn't fit the given context, just say I don't have the information for that."
),
("placeholder", "{messages}")
]
)
# list website
URLS_XANO = [
"https://docs.xano.com/about",
"https://releases.xano.com/?_gl=1*sifgtw*_ga*MTI5NTY3MTk5NS4xNzMwNjMzNjY3*_ga_EJWDZRK3CG*MTczMDgwNjg3Mi43LjEuMTczMDgwNjkyMy45LjAuODUyNzA5OTA4",
"https://docs.xano.com/onboarding-tutorial-reference",
"https://docs.xano.com/faq",
"https://docs.xano.com/about",
"https://docs.xano.com/what-xano-includes",
"https://docs.xano.com/what-xano-includes/instance",
"https://docs.xano.com/what-xano-includes/workspace",
"https://docs.xano.com/database/triggers",
"https://docs.xano.com/fundamentals/the-development-life-cycle",
]
URLS_WEWEB = [
"https://docs.weweb.io/start-here/welcome.html",
"https://docs.weweb.io/start-here/frequently-asked-questions.html",
"https://docs.weweb.io/editor/intro-to-the-editor.html",
"https://docs.weweb.io/editor/intro-to-html-css.html",
"https://docs.weweb.io/editor/how-to-use-the-add-panel.html",
"https://docs.weweb.io/editor/logs.html",
"https://docs.weweb.io/editor/copilot/import-figma-designs.html",
"https://docs.weweb.io/editor/app-settings/app-settings.html",
"https://docs.weweb.io/editor/app-settings/pwa.html"
] |