MCPcopy Create free account

hub / github.com/The-Pocket/PocketFlow-Tutorial-Website-Chatbot / functions

Functions57 in github.com/The-Pocket/PocketFlow-Tutorial-Website-Chatbot

↓ 9 callersFunctionaddMessage
(content, isUser = false, isSystem = false)
static/chatbot.js:1033
↓ 5 callersFunctionhideTyping
()
static/chatbot.js:1131
↓ 5 callersFunctionsetStatus
(status)
static/chatbot.js:943
↓ 4 callersFunctionloadResource
(url, type = 'script')
static/chatbot.js:652
↓ 3 callersFunctioncall_llm
(prompt: str)
utils/call_llm.py:4
↓ 3 callersFunctionclearChatHistory
()
static/chatbot.js:1135
↓ 3 callersFunctionconnectWebSocket
()
static/chatbot.js:1180
↓ 3 callersFunctioncreate_support_bot_flow
Create and return an AI support bot flow.
flow.py:4
↓ 3 callersFunctionfilter_valid_urls
Filter URLs based on allowed prefixes or domains. If allowed_prefixes_or_domains is empty, all valid URLs are returned (no domain filtering).
utils/url_validator.py:37
↓ 3 callersFunctionis_valid_url
Check if URL is valid based on allowed prefixes or domains.
utils/url_validator.py:8
↓ 2 callersFunctioncrawl_webpage
Crawl webpage to extract markdown content and all links using crawl4ai. This is a synchronous wrapper around an async implementation.
utils/web_crawler.py:4
↓ 2 callersFunctioncreateChatElements
()
static/chatbot.js:674
↓ 2 callersFunctiondetectTheme
()
static/chatbot.js:50
↓ 2 callersFunctionenableInput
()
static/chatbot.js:1211
↓ 2 callersFunctioninitializeChatbotLogic
(currentUrl, extraUrls, prefixes, chatbotName, wsUrl, instruction = '', isOpenByDefault = false, wasCurrentUrl
static/chatbot.js:884
↓ 2 callersFunctionshowTyping
()
static/chatbot.js:1126
↓ 2 callersFunctiontoggleChat
(forceOpen = null)
static/chatbot.js:950
↓ 2 callersFunctionupdateChatbotTheme
(newTheme)
static/chatbot.js:76
↓ 1 callersFunction_async_crawl
()
utils/web_crawler.py:9
↓ 1 callersMethodconnect
(self, websocket: WebSocket)
server.py:65
↓ 1 callersMethoddisconnect
(self, websocket: WebSocket)
server.py:71
↓ 1 callersFunctionget_domain_from_url
Extract domain from URL for allowed_domains
main.py:5
↓ 1 callersMethodget_flow
(self, websocket: WebSocket)
server.py:84
↓ 1 callersMethodget_shared_state
(self, websocket: WebSocket)
server.py:78
↓ 1 callersFunctionis_basic_valid_url
Check if URL has basic validity (proper scheme and netloc) without domain restrictions.
utils/url_validator.py:3
↓ 1 callersFunctionmain
()
main.py:10
↓ 1 callersFunctionrenderMarkdownWithMermaid
(markdownText)
static/chatbot.js:984
↓ 1 callersFunctionsendMessage
()
static/chatbot.js:1248
↓ 1 callersMethodset_shared_state
(self, websocket: WebSocket, state: Dict)
server.py:81
↓ 1 callersFunctionsetupAutomaticUrlDetection
(onPageChangeCallback)
static/chatbot.js:1361
↓ 1 callersFunctionsetupThemeObserver
()
static/chatbot.js:87
↓ 1 callersFunctionvalidate_and_sanitize_input
Validate and sanitize user inputs for safety.
server.py:18
↓ 1 callersFunctionwaitForConnection
()
static/chatbot.js:1290
Method__init__
(self)
server.py:61
FunctioncheckThemeChange
()
static/chatbot.js:88
Methodexec
Process a single URL to extract content and links
nodes.py:20
Methodexec
Make decision using LLM - focus purely on decision-making
nodes.py:148
Methodexec
Generate comprehensive answer based on collected knowledge
nodes.py:314
Methodexec_fallback
Fallback when crawling fails. The 'None' for links signals a failure.
nodes.py:26
Methodexec_fallback
Fallback when LLM decision fails
nodes.py:257
Methodexec_fallback
Fallback when answer generation fails
nodes.py:387
Functionget_chatbot
Serve the chatbot page.
server.py:47
Functionget_chatbot_js
Serve the chatbot JavaScript for embedding.
server.py:53
Functionget_root
Serve the main configuration page.
server.py:41
FunctionhandlePageChange
(newUrl)
static/chatbot.js:1325
FunctionhandleUrlChange
()
static/chatbot.js:1364
FunctioninitializeChatbot
* PocketFlow Chatbot - Standalone Embeddable Chatbot * * Usage: * <script src="chatbot.js"></script> * <script> * document.addEventListener('DOM
static/chatbot.js:22
Methodpost
Store results and update URL tracking
nodes.py:32
Methodpost
Handle the agent's decision
nodes.py:267
Methodpost
Store the final answer
nodes.py:392
Methodprep
(self, shared)
nodes.py:10
Methodprep
(self, shared)
nodes.py:90
Methodprep
(self, shared)
nodes.py:292
Functionrun_sync_flow_in_thread
()
server.py:155
FunctionstartNewConversation
()
static/chatbot.js:1149
FunctiontoggleMaximize
()
static/chatbot.js:973
Functionwebsocket_endpoint
(websocket: WebSocket)
server.py:90