lynxkite / examples /LynxScribe demo
darabos's picture
Use cwd instead of LYNXKITE_DATA.
e4ff751
raw
history blame
24.5 kB
{
"env": "LynxScribe",
"nodes": [
{
"id": "Input chat 1",
"type": "basic",
"data": {
"title": "Input chat",
"params": {
"chat": "who is the CTO of Lynx?"
},
"display": null,
"error": null,
"collapsed": null,
"meta": {
"inputs": {},
"params": {
"chat": {
"default": null,
"type": {
"type": "<class 'str'>"
},
"name": "chat"
}
},
"outputs": {
"output": {
"name": "output",
"type": {
"type": "None"
},
"position": "right"
}
},
"name": "Input chat",
"type": "basic"
},
"__execution_delay": 0.0
},
"position": {
"x": -493.5496596237119,
"y": 20.90123252513356
},
"height": 186.0,
"width": 259.0,
"parentId": null
},
{
"id": "View 1",
"type": "table_view",
"data": {
"title": "View",
"params": {},
"display": {
"dataframes": {
"df": {
"columns": [
"answer"
],
"data": [
[
"TheThe Chief Technology Officer (CTO) of Lynx Analytics is Chema Lizano. He leads the technology strategy and roadmap at the company, overseeing the vision, development, and implementation of solutions across various clients and environments. If you have any more questions regarding our team or services, feel free to ask!\n\nPlease visit https://www.lynxanalytics.com/board for further information."
]
]
}
}
},
"error": null,
"meta": {
"type": "table_view",
"name": "View",
"inputs": {
"input": {
"name": "input",
"type": {
"type": "<class 'inspect._empty'>"
},
"position": "left"
}
},
"outputs": {},
"params": {}
}
},
"position": {
"x": 731.7440706129762,
"y": -716.4943976910913
},
"width": 1256.0,
"parentId": null,
"height": 950.0
},
{
"id": "LLM 1",
"type": "basic",
"data": {
"title": "LLM",
"params": {
"name": "openai"
},
"display": null,
"error": null,
"meta": {
"inputs": {},
"outputs": {
"output": {
"type": {
"type": "None"
},
"name": "output",
"position": "top"
}
},
"type": "basic",
"params": {
"name": {
"default": "openai",
"name": "name",
"type": {
"type": "<class 'str'>"
}
}
},
"name": "LLM"
}
},
"position": {
"x": -312.5774211084781,
"y": 1093.4019527511366
},
"parentId": null,
"width": 200.0,
"height": 200.0
},
{
"id": "Scenario selector 1",
"type": "basic",
"data": {
"title": "Scenario selector",
"params": {
"scenario_file": "uploads/chat_api/scenarios.yaml",
"node_types": "intent_cluster"
},
"display": null,
"error": null,
"meta": {
"params": {
"scenario_file": {
"type": {
"type": "<class 'str'>"
},
"name": "scenario_file",
"default": null
},
"node_types": {
"default": "intent_cluster",
"type": {
"type": "<class 'str'>"
},
"name": "node_types"
}
},
"inputs": {},
"outputs": {
"output": {
"position": "top",
"name": "output",
"type": {
"type": "None"
}
}
},
"type": "basic",
"name": "Scenario selector"
}
},
"position": {
"x": -549.1300345090008,
"y": 1086.4852248156676
},
"parentId": null,
"height": 200.0,
"width": 200.0
},
{
"id": "Chat API 1",
"type": "basic",
"data": {
"title": "Chat API",
"params": {
"model": "gpt-4o-mini"
},
"display": null,
"error": null,
"meta": {
"name": "Chat API",
"type": "basic",
"outputs": {
"output": {
"type": {
"type": "None"
},
"position": "top",
"name": "output"
}
},
"inputs": {
"chatbot": {
"name": "chatbot",
"type": {
"type": "<class 'inspect._empty'>"
},
"position": "bottom"
},
"chat_processor": {
"name": "chat_processor",
"position": "bottom",
"type": {
"type": "<class 'inspect._empty'>"
}
},
"knowledge_base": {
"type": {
"type": "<class 'inspect._empty'>"
},
"position": "bottom",
"name": "knowledge_base"
}
},
"params": {
"model": {
"default": "gpt-4o-mini",
"type": {
"type": "<class 'str'>"
},
"name": "model"
}
}
}
},
"position": {
"x": -22.866663363810787,
"y": 258.20943122219336
},
"parentId": null,
"width": 200.0,
"height": 200.0
},
{
"id": "Knowledge base 1",
"type": "basic",
"data": {
"title": "Knowledge base",
"params": {
"template_cluster_path": "uploads/chat_api/data/lynx/tempclusters.pickle",
"edges_path": "uploads/chat_api/data/lynx/edges.pickle",
"nodes_path": "uploads/chat_api/data/lynx/nodes.pickle"
},
"display": null,
"error": null,
"meta": {
"name": "Knowledge base",
"type": "basic",
"params": {
"nodes_path": {
"name": "nodes_path",
"default": "nodes.pickle",
"type": {
"type": "<class 'str'>"
}
},
"template_cluster_path": {
"type": {
"type": "<class 'str'>"
},
"name": "template_cluster_path",
"default": "tempclusters.pickle"
},
"edges_path": {
"name": "edges_path",
"default": "edges.pickle",
"type": {
"type": "<class 'str'>"
}
}
},
"inputs": {},
"outputs": {
"output": {
"position": "top",
"name": "output",
"type": {
"type": "None"
}
}
}
}
},
"position": {
"x": 598.8683124946176,
"y": 609.9499973808545
},
"width": 336.0,
"height": 320.0,
"parentId": null
},
{
"id": "RAG chatbot 1",
"type": "basic",
"data": {
"title": "RAG chatbot",
"params": {
"limits_by_type": "{\"information\": [2, 3], \"summary\": [2, 3]}",
"max_results": "5",
"negative_answer": "I'm sorry, but the data I've been trained on does not contain any information related to your question.",
"strict_limits": true
},
"display": null,
"error": null,
"meta": {
"outputs": {
"output": {
"position": "top",
"name": "output",
"type": {
"type": "None"
}
}
},
"params": {
"max_results": {
"default": 5.0,
"type": {
"type": "<class 'int'>"
},
"name": "max_results"
},
"strict_limits": {
"name": "strict_limits",
"default": true,
"type": {
"type": "<class 'bool'>"
}
},
"negative_answer": {
"default": "I'm sorry, but the data I've been trained on does not contain any information related to your question.",
"name": "negative_answer",
"type": {
"type": "<class 'str'>"
}
},
"limits_by_type": {
"default": "{}",
"name": "limits_by_type",
"type": {
"type": "<class 'str'>"
}
}
},
"name": "RAG chatbot",
"type": "basic",
"inputs": {
"rag_graph": {
"type": {
"type": "<class 'inspect._empty'>"
},
"name": "rag_graph",
"position": "bottom"
},
"llm": {
"name": "llm",
"position": "bottom",
"type": {
"type": "<class 'inspect._empty'>"
}
},
"scenario_selector": {
"type": {
"type": "<class 'inspect._empty'>"
},
"name": "scenario_selector",
"position": "bottom"
}
}
},
"beingResized": false
},
"position": {
"x": -533.1301830766971,
"y": 547.294980747757
},
"parentId": null,
"height": 399.0,
"width": 339.0
},
{
"id": "RAG graph 1",
"type": "basic",
"data": {
"title": "RAG graph",
"params": {},
"display": null,
"error": null,
"meta": {
"type": "basic",
"inputs": {
"text_embedder": {
"type": {
"type": "<class 'inspect._empty'>"
},
"position": "bottom",
"name": "text_embedder"
},
"vector_store": {
"position": "bottom",
"type": {
"type": "<class 'inspect._empty'>"
},
"name": "vector_store"
}
},
"name": "RAG graph",
"params": {},
"outputs": {
"output": {
"position": "top",
"type": {
"type": "None"
},
"name": "output"
}
}
}
},
"position": {
"x": -817.8208895639339,
"y": 1014.836542916127
},
"parentId": null,
"width": 200.0,
"height": 200.0
},
{
"id": "Vector store 1",
"type": "basic",
"data": {
"title": "Vector store",
"params": {
"name": "chromadb",
"collection_name": "lynx"
},
"display": null,
"error": null,
"beingResized": false,
"meta": {
"params": {
"collection_name": {
"type": {
"type": "<class 'str'>"
},
"default": "lynx",
"name": "collection_name"
},
"name": {
"default": "chromadb",
"type": {
"type": "<class 'str'>"
},
"name": "name"
}
},
"type": "basic",
"name": "Vector store",
"outputs": {
"output": {
"type": {
"type": "None"
},
"position": "top",
"name": "output"
}
},
"inputs": {}
}
},
"position": {
"x": -1053.794625339574,
"y": 1347.7711940497127
},
"height": 227.0,
"parentId": null,
"width": 275.0
},
{
"id": "Text embedder 2",
"type": "basic",
"data": {
"title": "Text embedder",
"params": {
"model": "text-embedding-ada-002"
},
"display": null,
"error": null,
"meta": {
"params": {
"model": {
"default": "text-embedding-ada-002",
"type": {
"type": "<class 'str'>"
},
"name": "model"
}
},
"name": "Text embedder",
"outputs": {
"output": {
"type": {
"type": "None"
},
"position": "top",
"name": "output"
}
},
"type": "basic",
"inputs": {
"llm": {
"type": {
"type": "<class 'inspect._empty'>"
},
"name": "llm",
"position": "bottom"
}
}
}
},
"position": {
"x": -719.98604638686,
"y": 1343.5978526690794
},
"width": 200.0,
"height": 200.0,
"parentId": null
},
{
"id": "LLM 2",
"type": "basic",
"data": {
"title": "LLM",
"params": {
"name": "openai"
},
"display": null,
"error": null,
"meta": {
"outputs": {
"output": {
"position": "top",
"name": "output",
"type": {
"type": "None"
}
}
},
"name": "LLM",
"type": "basic",
"inputs": {},
"params": {
"name": {
"default": "openai",
"name": "name",
"type": {
"type": "<class 'str'>"
}
}
}
}
},
"position": {
"x": -727.6171373682814,
"y": 1649.7242636905507
},
"width": 200.0,
"parentId": null,
"height": 200.0
},
{
"id": "Truncate history 1",
"type": "basic",
"data": {
"title": "Truncate history",
"params": {
"max_tokens": 10000.0
},
"display": null,
"error": null,
"meta": {
"outputs": {
"output": {
"type": {
"type": "None"
},
"name": "output",
"position": "top"
}
},
"type": "basic",
"params": {
"max_tokens": {
"default": 10000.0,
"name": "max_tokens",
"type": {
"type": "<class 'int'>"
}
}
},
"name": "Truncate history",
"inputs": {}
}
},
"position": {
"x": 0.08889822620079713,
"y": 1044.7639853229612
},
"height": 200.0,
"width": 200.0,
"parentId": null
},
{
"id": "Chat processor 1",
"type": "basic",
"data": {
"title": "Chat processor",
"params": {},
"display": null,
"error": null,
"__execution_delay": null,
"collapsed": true,
"meta": {
"name": "Chat processor",
"inputs": {
"processor": {
"name": "processor",
"position": "bottom",
"type": {
"type": "<class 'inspect._empty'>"
}
}
},
"params": {},
"type": "basic",
"outputs": {
"output": {
"type": {
"type": "None"
},
"position": "top",
"name": "output"
}
}
}
},
"position": {
"x": 182.89729246405872,
"y": 778.546274223181
},
"parentId": null,
"width": 200.0,
"height": 200.0
},
{
"id": "Mask 1",
"type": "basic",
"data": {
"title": "Mask",
"params": {
"mask_pattern": "masked_email_address_{}",
"name": "email",
"exceptions": "[email protected],[email protected],[email protected],[email protected]",
"regex": "([a-z0-9!#$%&'*+\\/=?^_`{|.}~-]+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)"
},
"display": null,
"error": null,
"meta": {
"inputs": {},
"outputs": {
"output": {
"position": "top",
"name": "output",
"type": {
"type": "None"
}
}
},
"type": "basic",
"name": "Mask",
"params": {
"name": {
"default": "",
"name": "name",
"type": {
"type": "<class 'str'>"
}
},
"exceptions": {
"name": "exceptions",
"type": {
"type": "<class 'str'>"
},
"default": ""
},
"regex": {
"type": {
"type": "<class 'str'>"
},
"name": "regex",
"default": ""
},
"mask_pattern": {
"default": "",
"type": {
"type": "<class 'str'>"
},
"name": "mask_pattern"
}
}
}
},
"position": {
"x": 233.69759202223884,
"y": 1041.6145468043276
},
"height": 200.0,
"parentId": null,
"width": 200.0
},
{
"id": "Mask 2",
"type": "basic",
"data": {
"title": "Mask",
"params": {
"regex": "((?:(?:\\\\d{4}[- ]?){3}\\\\d{4}|\\\\d{15,16}))(?![\\\\d])",
"exceptions": "",
"name": "credit_card",
"mask_pattern": "masked_credit_card_number_{}"
},
"display": null,
"error": null,
"meta": {
"outputs": {
"output": {
"name": "output",
"position": "top",
"type": {
"type": "None"
}
}
},
"inputs": {},
"name": "Mask",
"type": "basic",
"params": {
"exceptions": {
"type": {
"type": "<class 'str'>"
},
"default": "",
"name": "exceptions"
},
"regex": {
"default": "",
"type": {
"type": "<class 'str'>"
},
"name": "regex"
},
"mask_pattern": {
"name": "mask_pattern",
"type": {
"type": "<class 'str'>"
},
"default": ""
},
"name": {
"name": "name",
"default": "",
"type": {
"type": "<class 'str'>"
}
}
}
}
},
"position": {
"x": 513.2761671440603,
"y": 1034.8547191984255
},
"width": 200.0,
"parentId": null,
"height": 200.0
},
{
"id": "Test Chat API 2",
"type": "basic",
"data": {
"title": "Test Chat API",
"params": {
"show_details": false
},
"display": null,
"error": null,
"collapsed": false,
"__execution_delay": 0.0,
"meta": {
"params": {
"show_details": {
"default": false,
"type": {
"type": "<class 'bool'>"
},
"name": "show_details"
}
},
"inputs": {
"message": {
"name": "message",
"position": "left",
"type": {
"type": "<class 'inspect._empty'>"
}
},
"chat_api": {
"position": "bottom",
"type": {
"type": "<class 'inspect._empty'>"
},
"name": "chat_api"
}
},
"outputs": {
"output": {
"position": "right",
"type": {
"type": "None"
},
"name": "output"
}
},
"name": "Test Chat API",
"type": "basic"
}
},
"position": {
"x": -57.377776548056346,
"y": -16.924593985348814
},
"width": 376.0,
"parentId": null,
"height": 225.0
}
],
"edges": [
{
"id": "xy-edge__Knowledge base 1output-Chat API 1knowledge_base",
"source": "Knowledge base 1",
"target": "Chat API 1",
"sourceHandle": "output",
"targetHandle": "knowledge_base"
},
{
"id": "xy-edge__RAG chatbot 1output-Chat API 1chatbot",
"source": "RAG chatbot 1",
"target": "Chat API 1",
"sourceHandle": "output",
"targetHandle": "chatbot"
},
{
"id": "xy-edge__LLM 1output-RAG chatbot 1llm",
"source": "LLM 1",
"target": "RAG chatbot 1",
"sourceHandle": "output",
"targetHandle": "llm"
},
{
"id": "xy-edge__Scenario selector 1output-RAG chatbot 1scenario_selector",
"source": "Scenario selector 1",
"target": "RAG chatbot 1",
"sourceHandle": "output",
"targetHandle": "scenario_selector"
},
{
"id": "xy-edge__RAG graph 1output-RAG chatbot 1rag_graph",
"source": "RAG graph 1",
"target": "RAG chatbot 1",
"sourceHandle": "output",
"targetHandle": "rag_graph"
},
{
"id": "xy-edge__Vector store 1output-RAG graph 1vector_store",
"source": "Vector store 1",
"target": "RAG graph 1",
"sourceHandle": "output",
"targetHandle": "vector_store"
},
{
"id": "xy-edge__Text embedder 2output-RAG graph 1text_embedder",
"source": "Text embedder 2",
"target": "RAG graph 1",
"sourceHandle": "output",
"targetHandle": "text_embedder"
},
{
"id": "xy-edge__LLM 2output-Text embedder 2llm",
"source": "LLM 2",
"target": "Text embedder 2",
"sourceHandle": "output",
"targetHandle": "llm"
},
{
"id": "xy-edge__Truncate history 1output-Chat processor 1processor",
"source": "Truncate history 1",
"target": "Chat processor 1",
"sourceHandle": "output",
"targetHandle": "processor"
},
{
"id": "xy-edge__Chat processor 1output-Chat API 1chat_processor",
"source": "Chat processor 1",
"target": "Chat API 1",
"sourceHandle": "output",
"targetHandle": "chat_processor"
},
{
"id": "xy-edge__Mask 1output-Chat processor 1processor",
"source": "Mask 1",
"target": "Chat processor 1",
"sourceHandle": "output",
"targetHandle": "processor"
},
{
"id": "xy-edge__Mask 2output-Chat processor 1processor",
"source": "Mask 2",
"target": "Chat processor 1",
"sourceHandle": "output",
"targetHandle": "processor"
},
{
"id": "xy-edge__Input chat 1output-Test Chat API 2message",
"source": "Input chat 1",
"target": "Test Chat API 2",
"sourceHandle": "output",
"targetHandle": "message"
},
{
"id": "xy-edge__Test Chat API 2output-View 1input",
"source": "Test Chat API 2",
"target": "View 1",
"sourceHandle": "output",
"targetHandle": "input"
},
{
"id": "xy-edge__Chat API 1output-Test Chat API 2chat_api",
"source": "Chat API 1",
"target": "Test Chat API 2",
"sourceHandle": "output",
"targetHandle": "chat_api"
}
]
}