File size: 37,121 Bytes
481fba7 | 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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 | {
"nodes": [
{
"id": "recursiveCharacterTextSplitter_0",
"position": {
"x": 213.66633969673887,
"y": 277.61843101631064
},
"type": "customNode",
"data": {
"id": "recursiveCharacterTextSplitter_0",
"label": "Recursive Character Text Splitter",
"version": 2,
"name": "recursiveCharacterTextSplitter",
"type": "RecursiveCharacterTextSplitter",
"baseClasses": [
"RecursiveCharacterTextSplitter",
"TextSplitter",
"BaseDocumentTransformer",
"Runnable"
],
"category": "Text Splitters",
"description": "Split documents recursively by different characters - starting with \"\\n\\n\", then \"\\n\", then \" \"",
"inputParams": [
{
"label": "Chunk Size",
"name": "chunkSize",
"type": "number",
"description": "Number of characters in each chunk. Default is 1000.",
"default": 1000,
"optional": true,
"id": "recursiveCharacterTextSplitter_0-input-chunkSize-number",
"display": true
},
{
"label": "Chunk Overlap",
"name": "chunkOverlap",
"type": "number",
"description": "Number of characters to overlap between chunks. Default is 200.",
"default": 200,
"optional": true,
"id": "recursiveCharacterTextSplitter_0-input-chunkOverlap-number",
"display": true
},
{
"label": "Custom Separators",
"name": "separators",
"type": "string",
"rows": 4,
"description": "Array of custom separators to determine when to split the text, will override the default separators",
"placeholder": "[\"|\", \"##\", \">\", \"-\"]",
"additionalParams": true,
"optional": true,
"id": "recursiveCharacterTextSplitter_0-input-separators-string",
"display": true
}
],
"inputAnchors": [],
"inputs": {
"chunkSize": 1000,
"chunkOverlap": "100",
"separators": ""
},
"outputAnchors": [
{
"id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
"name": "recursiveCharacterTextSplitter",
"label": "RecursiveCharacterTextSplitter",
"description": "Split documents recursively by different characters - starting with \"\\n\\n\", then \"\\n\", then \" \"",
"type": "RecursiveCharacterTextSplitter | TextSplitter | BaseDocumentTransformer | Runnable"
}
],
"outputs": {},
"selected": false
},
"width": 300,
"height": 432,
"selected": false,
"positionAbsolute": {
"x": 213.66633969673887,
"y": 277.61843101631064
},
"dragging": false
},
{
"id": "cheerioWebScraper_0",
"position": {
"x": 634.3134396320586,
"y": 396.07236301516616
},
"type": "customNode",
"data": {
"id": "cheerioWebScraper_0",
"label": "Cheerio Web Scraper",
"version": 2,
"name": "cheerioWebScraper",
"type": "Document",
"baseClasses": [
"Document"
],
"category": "Document Loaders",
"description": "Load data from webpages",
"inputParams": [
{
"label": "URL",
"name": "url",
"type": "string",
"id": "cheerioWebScraper_0-input-url-string",
"display": true
},
{
"label": "Get Relative Links Method",
"name": "relativeLinksMethod",
"type": "options",
"description": "Select a method to retrieve relative links",
"options": [
{
"label": "Web Crawl",
"name": "webCrawl",
"description": "Crawl relative links from HTML URL"
},
{
"label": "Scrape XML Sitemap",
"name": "scrapeXMLSitemap",
"description": "Scrape relative links from XML sitemap URL"
}
],
"default": "webCrawl",
"optional": true,
"additionalParams": true,
"id": "cheerioWebScraper_0-input-relativeLinksMethod-options",
"display": true
},
{
"label": "Get Relative Links Limit",
"name": "limit",
"type": "number",
"optional": true,
"default": "10",
"additionalParams": true,
"description": "Only used when \"Get Relative Links Method\" is selected. Set 0 to retrieve all relative links, default limit is 10.",
"warning": "Retrieving all links might take long time, and all links will be upserted again if the flow's state changed (eg: different URL, chunk size, etc)",
"id": "cheerioWebScraper_0-input-limit-number",
"display": true
},
{
"label": "Selector (CSS)",
"name": "selector",
"type": "string",
"description": "Specify a CSS selector to select the content to be extracted",
"optional": true,
"additionalParams": true,
"id": "cheerioWebScraper_0-input-selector-string",
"display": true
},
{
"label": "Additional Metadata",
"name": "metadata",
"type": "json",
"description": "Additional metadata to be added to the extracted documents",
"optional": true,
"additionalParams": true,
"id": "cheerioWebScraper_0-input-metadata-json",
"display": true
},
{
"label": "Omit Metadata Keys",
"name": "omitMetadataKeys",
"type": "string",
"rows": 4,
"description": "Each document loader comes with a default set of metadata keys that are extracted from the document. You can use this field to omit some of the default metadata keys. The value should be a list of keys, seperated by comma. Use * to omit all metadata keys execept the ones you specify in the Additional Metadata field",
"placeholder": "key1, key2, key3.nestedKey1",
"optional": true,
"additionalParams": true,
"id": "cheerioWebScraper_0-input-omitMetadataKeys-string",
"display": true
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "cheerioWebScraper_0-input-textSplitter-TextSplitter",
"display": true
}
],
"inputs": {
"url": "https://recht.nrw.de/lmi/owa/br_text_anzeigen?v_id=10000000000000000654",
"textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}",
"relativeLinksMethod": "webCrawl",
"limit": "10",
"selector": "",
"metadata": "",
"omitMetadataKeys": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"description": "Array of document objects containing metadata and pageContent",
"options": [
{
"id": "cheerioWebScraper_0-output-document-Document|json",
"name": "document",
"label": "Document",
"description": "Array of document objects containing metadata and pageContent",
"type": "Document | json"
},
{
"id": "cheerioWebScraper_0-output-text-string|json",
"name": "text",
"label": "Text",
"description": "Concatenated string from pageContent of documents",
"type": "string | json"
}
],
"default": "document"
}
],
"outputs": {
"output": "document"
},
"selected": false
},
"width": 300,
"height": 455,
"selected": false,
"positionAbsolute": {
"x": 634.3134396320586,
"y": 396.07236301516616
},
"dragging": false
},
{
"id": "fileLoader_0",
"position": {
"x": 650.8786850888786,
"y": -99.61017668321267
},
"type": "customNode",
"data": {
"id": "fileLoader_0",
"label": "File Loader",
"version": 2,
"name": "fileLoader",
"type": "Document",
"baseClasses": [
"Document"
],
"category": "Document Loaders",
"description": "A generic file loader that can load different file types",
"inputParams": [
{
"label": "File",
"name": "file",
"type": "file",
"fileType": "*",
"id": "fileLoader_0-input-file-file",
"display": true
},
{
"label": "Pdf Usage",
"name": "usage",
"type": "options",
"description": "Only when loading PDF files",
"options": [
{
"label": "One document per page",
"name": "perPage"
},
{
"label": "One document per file",
"name": "perFile"
}
],
"default": "perPage",
"optional": true,
"additionalParams": true,
"id": "fileLoader_0-input-usage-options",
"display": true
},
{
"label": "Use Legacy Build",
"name": "legacyBuild",
"type": "boolean",
"description": "Use legacy build for PDF compatibility issues",
"optional": true,
"additionalParams": true,
"id": "fileLoader_0-input-legacyBuild-boolean",
"display": true
},
{
"label": "JSONL Pointer Extraction",
"name": "pointerName",
"type": "string",
"description": "Only when loading JSONL files",
"placeholder": "<pointerName>",
"optional": true,
"additionalParams": true,
"id": "fileLoader_0-input-pointerName-string",
"display": true
},
{
"label": "Additional Metadata",
"name": "metadata",
"type": "json",
"description": "Additional metadata to be added to the extracted documents",
"optional": true,
"additionalParams": true,
"id": "fileLoader_0-input-metadata-json",
"display": true
},
{
"label": "Omit Metadata Keys",
"name": "omitMetadataKeys",
"type": "string",
"rows": 4,
"description": "Each document loader comes with a default set of metadata keys that are extracted from the document. You can use this field to omit some of the default metadata keys. The value should be a list of keys, seperated by comma. Use * to omit all metadata keys execept the ones you specify in the Additional Metadata field",
"placeholder": "key1, key2, key3.nestedKey1",
"optional": true,
"additionalParams": true,
"id": "fileLoader_0-input-omitMetadataKeys-string",
"display": true
}
],
"inputAnchors": [
{
"label": "Text Splitter",
"name": "textSplitter",
"type": "TextSplitter",
"optional": true,
"id": "fileLoader_0-input-textSplitter-TextSplitter",
"display": true
}
],
"inputs": {
"textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}",
"usage": "perPage",
"legacyBuild": "",
"pointerName": "",
"metadata": "",
"omitMetadataKeys": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"description": "Array of document objects containing metadata and pageContent",
"options": [
{
"id": "fileLoader_0-output-document-Document|json",
"name": "document",
"label": "Document",
"description": "Array of document objects containing metadata and pageContent",
"type": "Document | json"
},
{
"id": "fileLoader_0-output-text-string|json",
"name": "text",
"label": "Text",
"description": "Concatenated string from pageContent of documents",
"type": "string | json"
}
],
"default": "document"
}
],
"outputs": {
"output": "document"
},
"selected": false
},
"width": 300,
"height": 459,
"selected": false,
"positionAbsolute": {
"x": 650.8786850888786,
"y": -99.61017668321267
},
"dragging": false
},
{
"id": "memoryVectorStore_0",
"position": {
"x": 1223.0565194111455,
"y": 354.4959534107418
},
"type": "customNode",
"data": {
"id": "memoryVectorStore_0",
"label": "In-Memory Vector Store",
"version": 1,
"name": "memoryVectorStore",
"type": "Memory",
"baseClasses": [
"Memory",
"VectorStoreRetriever",
"BaseRetriever"
],
"category": "Vector Stores",
"description": "In-memory vectorstore that stores embeddings and does an exact, linear search for the most similar embeddings.",
"inputParams": [
{
"label": "Top K",
"name": "topK",
"description": "Number of top results to fetch. Default to 4",
"placeholder": "4",
"type": "number",
"optional": true,
"id": "memoryVectorStore_0-input-topK-number",
"display": true
}
],
"inputAnchors": [
{
"label": "Document",
"name": "document",
"type": "Document",
"list": true,
"optional": true,
"id": "memoryVectorStore_0-input-document-Document",
"display": true
},
{
"label": "Embeddings",
"name": "embeddings",
"type": "Embeddings",
"id": "memoryVectorStore_0-input-embeddings-Embeddings",
"display": true
}
],
"inputs": {
"document": [
"{{fileLoader_0.data.instance}}",
"{{cheerioWebScraper_0.data.instance}}"
],
"embeddings": "{{huggingFaceInferenceEmbeddings_0.data.instance}}",
"topK": ""
},
"outputAnchors": [
{
"name": "output",
"label": "Output",
"type": "options",
"description": "",
"options": [
{
"id": "memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever",
"name": "retriever",
"label": "Memory Retriever",
"description": "",
"type": "Memory | VectorStoreRetriever | BaseRetriever"
},
{
"id": "memoryVectorStore_0-output-vectorStore-Memory|VectorStore",
"name": "vectorStore",
"label": "Memory Vector Store",
"description": "",
"type": "Memory | VectorStore"
}
],
"default": "retriever"
}
],
"outputs": {
"output": "retriever"
},
"selected": false
},
"width": 300,
"height": 409,
"selected": false,
"positionAbsolute": {
"x": 1223.0565194111455,
"y": 354.4959534107418
},
"dragging": false
},
{
"id": "huggingFaceInferenceEmbeddings_0",
"position": {
"x": 800.5209198760278,
"y": 938.3403835917181
},
"type": "customNode",
"data": {
"id": "huggingFaceInferenceEmbeddings_0",
"label": "HuggingFace Inference Embeddings",
"version": 1,
"name": "huggingFaceInferenceEmbeddings",
"type": "HuggingFaceInferenceEmbeddings",
"baseClasses": [
"HuggingFaceInferenceEmbeddings",
"Embeddings"
],
"category": "Embeddings",
"description": "HuggingFace Inference API to generate embeddings for a given text",
"inputParams": [
{
"label": "Connect Credential",
"name": "credential",
"type": "credential",
"credentialNames": [
"huggingFaceApi"
],
"id": "huggingFaceInferenceEmbeddings_0-input-credential-credential",
"display": true
},
{
"label": "Model",
"name": "modelName",
"type": "string",
"description": "If using own inference endpoint, leave this blank",
"placeholder": "sentence-transformers/distilbert-base-nli-mean-tokens",
"optional": true,
"id": "huggingFaceInferenceEmbeddings_0-input-modelName-string",
"display": true
},
{
"label": "Endpoint",
"name": "endpoint",
"type": "string",
"placeholder": "https://xyz.eu-west-1.aws.endpoints.huggingface.cloud/sentence-transformers/all-MiniLM-L6-v2",
"description": "Using your own inference endpoint",
"optional": true,
"id": "huggingFaceInferenceEmbeddings_0-input-endpoint-string",
"display": true
}
],
"inputAnchors": [],
"inputs": {
"modelName": "",
"endpoint": ""
},
"outputAnchors": [
{
"id": "huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings",
"name": "huggingFaceInferenceEmbeddings",
"label": "HuggingFaceInferenceEmbeddings",
"description": "HuggingFace Inference API to generate embeddings for a given text",
"type": "HuggingFaceInferenceEmbeddings | Embeddings"
}
],
"outputs": {},
"selected": false
},
"width": 300,
"height": 475,
"selected": false,
"positionAbsolute": {
"x": 800.5209198760278,
"y": 938.3403835917181
},
"dragging": false
},
{
"id": "chatMistralAI_0",
"position": {
"x": 1595.917318086838,
"y": -45.513470613474084
},
"type": "customNode",
"data": {
"id": "chatMistralAI_0",
"label": "ChatMistralAI",
"version": 4,
"name": "chatMistralAI",
"type": "ChatMistralAI",
"baseClasses": [
"ChatMistralAI",
"BaseChatModel",
"BaseLanguageModel",
"Runnable"
],
"category": "Chat Models",
"description": "Wrapper around Mistral large language models that use the Chat endpoint",
"inputParams": [
{
"label": "Connect Credential",
"name": "credential",
"type": "credential",
"credentialNames": [
"mistralAIApi"
],
"id": "chatMistralAI_0-input-credential-credential",
"display": true
},
{
"label": "Model Name",
"name": "modelName",
"type": "asyncOptions",
"loadMethod": "listModels",
"default": "mistral-tiny",
"id": "chatMistralAI_0-input-modelName-asyncOptions",
"display": true
},
{
"label": "Temperature",
"name": "temperature",
"type": "number",
"description": "What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.",
"step": 0.1,
"default": 0.9,
"optional": true,
"id": "chatMistralAI_0-input-temperature-number",
"display": true
},
{
"label": "Streaming",
"name": "streaming",
"type": "boolean",
"default": true,
"optional": true,
"additionalParams": true,
"id": "chatMistralAI_0-input-streaming-boolean",
"display": true
},
{
"label": "Max Output Tokens",
"name": "maxOutputTokens",
"type": "number",
"description": "The maximum number of tokens to generate in the completion.",
"step": 1,
"optional": true,
"additionalParams": true,
"id": "chatMistralAI_0-input-maxOutputTokens-number",
"display": true
},
{
"label": "Top Probability",
"name": "topP",
"type": "number",
"description": "Nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.",
"step": 0.1,
"optional": true,
"additionalParams": true,
"id": "chatMistralAI_0-input-topP-number",
"display": true
},
{
"label": "Random Seed",
"name": "randomSeed",
"type": "number",
"description": "The seed to use for random sampling. If set, different calls will generate deterministic results.",
"step": 1,
"optional": true,
"additionalParams": true,
"id": "chatMistralAI_0-input-randomSeed-number",
"display": true
},
{
"label": "Safe Mode",
"name": "safeMode",
"type": "boolean",
"description": "Whether to inject a safety prompt before all conversations.",
"optional": true,
"additionalParams": true,
"id": "chatMistralAI_0-input-safeMode-boolean",
"display": true
},
{
"label": "Override Endpoint",
"name": "overrideEndpoint",
"type": "string",
"optional": true,
"additionalParams": true,
"id": "chatMistralAI_0-input-overrideEndpoint-string",
"display": true
}
],
"inputAnchors": [
{
"label": "Cache",
"name": "cache",
"type": "BaseCache",
"optional": true,
"id": "chatMistralAI_0-input-cache-BaseCache",
"display": true
}
],
"inputs": {
"cache": "",
"modelName": "mistral-tiny",
"temperature": 0.9,
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"randomSeed": "",
"safeMode": "",
"overrideEndpoint": ""
},
"outputAnchors": [
{
"id": "chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable",
"name": "chatMistralAI",
"label": "ChatMistralAI",
"description": "Wrapper around Mistral large language models that use the Chat endpoint",
"type": "ChatMistralAI | BaseChatModel | BaseLanguageModel | Runnable"
}
],
"outputs": {},
"selected": false
},
"width": 300,
"height": 574,
"selected": false,
"positionAbsolute": {
"x": 1595.917318086838,
"y": -45.513470613474084
},
"dragging": false
},
{
"id": "conversationalRetrievalQAChain_0",
"position": {
"x": 2050.4776365303856,
"y": 510.2391804991254
},
"type": "customNode",
"data": {
"id": "conversationalRetrievalQAChain_0",
"label": "Conversational Retrieval QA Chain",
"version": 3,
"name": "conversationalRetrievalQAChain",
"type": "ConversationalRetrievalQAChain",
"baseClasses": [
"ConversationalRetrievalQAChain",
"BaseChain",
"Runnable"
],
"category": "Chains",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"inputParams": [
{
"label": "Return Source Documents",
"name": "returnSourceDocuments",
"type": "boolean",
"optional": true,
"id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean",
"display": true
},
{
"label": "Rephrase Prompt",
"name": "rephrasePrompt",
"type": "string",
"description": "Using previous chat history, rephrase question into a standalone question",
"warning": "Prompt must include input variables: {chat_history} and {question}",
"rows": 4,
"additionalParams": true,
"optional": true,
"default": "Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.\n\nChat History:\n{chat_history}\nFollow Up Input: {question}\nStandalone Question:",
"id": "conversationalRetrievalQAChain_0-input-rephrasePrompt-string",
"display": true
},
{
"label": "Response Prompt",
"name": "responsePrompt",
"type": "string",
"description": "Taking the rephrased question, search for answer from the provided context",
"warning": "Prompt must include input variable: {context}",
"rows": 4,
"additionalParams": true,
"optional": true,
"default": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". Using the provided context, answer the user's question to the best of your ability using the resources provided.\nIf there is nothing in the context relevant to the question at hand, just say \"Hmm, I'm not sure\" and stop after that. Refuse to answer any question not about the info. Never break character.\n------------\n{context}\n------------\nREMEMBER: If there is no relevant information within the context, just say \"Hmm, I'm not sure\". Don't try to make up an answer. Never break character.",
"id": "conversationalRetrievalQAChain_0-input-responsePrompt-string",
"display": true
}
],
"inputAnchors": [
{
"label": "Chat Model",
"name": "model",
"type": "BaseChatModel",
"id": "conversationalRetrievalQAChain_0-input-model-BaseChatModel",
"display": true
},
{
"label": "Vector Store Retriever",
"name": "vectorStoreRetriever",
"type": "BaseRetriever",
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"display": true
},
{
"label": "Memory",
"name": "memory",
"type": "BaseMemory",
"optional": true,
"description": "If left empty, a default BufferMemory will be used",
"id": "conversationalRetrievalQAChain_0-input-memory-BaseMemory",
"display": true
},
{
"label": "Input Moderation",
"description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
"name": "inputModeration",
"type": "Moderation",
"optional": true,
"list": true,
"id": "conversationalRetrievalQAChain_0-input-inputModeration-Moderation",
"display": true
}
],
"inputs": {
"model": "{{chatMistralAI_0.data.instance}}",
"vectorStoreRetriever": "{{memoryVectorStore_0.data.instance}}",
"memory": "{{bufferMemory_0.data.instance}}",
"returnSourceDocuments": "",
"rephrasePrompt": "Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.\n\nChat History:\n{chat_history}\nFollow Up Input: {question}\nStandalone Question:",
"responsePrompt": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". Using the provided context, answer the user's question to the best of your ability using the resources provided.\nIf there is nothing in the context relevant to the question at hand, just say \"Hmm, I'm not sure\" and stop after that. Refuse to answer any question not about the info. Never break character.\n------------\n{context}\n------------\nREMEMBER: If there is no relevant information within the context, just say \"Hmm, I'm not sure\". Don't try to make up an answer. Never break character.",
"inputModeration": ""
},
"outputAnchors": [
{
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|Runnable",
"name": "conversationalRetrievalQAChain",
"label": "ConversationalRetrievalQAChain",
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
"type": "ConversationalRetrievalQAChain | BaseChain | Runnable"
}
],
"outputs": {},
"selected": false
},
"width": 300,
"height": 532,
"selected": false,
"positionAbsolute": {
"x": 2050.4776365303856,
"y": 510.2391804991254
},
"dragging": false
},
{
"id": "bufferMemory_0",
"position": {
"x": 1582.3823941244955,
"y": 983.0773590603847
},
"type": "customNode",
"data": {
"id": "bufferMemory_0",
"label": "Buffer Memory",
"version": 2,
"name": "bufferMemory",
"type": "BufferMemory",
"baseClasses": [
"BufferMemory",
"BaseChatMemory",
"BaseMemory"
],
"category": "Memory",
"description": "Retrieve chat messages stored in database",
"inputParams": [
{
"label": "Session Id",
"name": "sessionId",
"type": "string",
"description": "If not specified, a random id will be used. Learn <a target=\"_blank\" href=\"https://docs.flowiseai.com/memory#ui-and-embedded-chat\">more</a>",
"default": "",
"additionalParams": true,
"optional": true,
"id": "bufferMemory_0-input-sessionId-string",
"display": true
},
{
"label": "Memory Key",
"name": "memoryKey",
"type": "string",
"default": "chat_history",
"additionalParams": true,
"id": "bufferMemory_0-input-memoryKey-string",
"display": true
}
],
"inputAnchors": [],
"inputs": {
"sessionId": "",
"memoryKey": "chat_history"
},
"outputAnchors": [
{
"id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"name": "bufferMemory",
"label": "BufferMemory",
"description": "Retrieve chat messages stored in database",
"type": "BufferMemory | BaseChatMemory | BaseMemory"
}
],
"outputs": {},
"selected": false
},
"width": 300,
"height": 256,
"selected": false,
"positionAbsolute": {
"x": 1582.3823941244955,
"y": 983.0773590603847
},
"dragging": false
}
],
"edges": [
{
"source": "recursiveCharacterTextSplitter_0",
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
"target": "cheerioWebScraper_0",
"targetHandle": "cheerioWebScraper_0-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable-cheerioWebScraper_0-cheerioWebScraper_0-input-textSplitter-TextSplitter"
},
{
"source": "recursiveCharacterTextSplitter_0",
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
"target": "fileLoader_0",
"targetHandle": "fileLoader_0-input-textSplitter-TextSplitter",
"type": "buttonedge",
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable-fileLoader_0-fileLoader_0-input-textSplitter-TextSplitter"
},
{
"source": "fileLoader_0",
"sourceHandle": "fileLoader_0-output-document-Document|json",
"target": "memoryVectorStore_0",
"targetHandle": "memoryVectorStore_0-input-document-Document",
"type": "buttonedge",
"id": "fileLoader_0-fileLoader_0-output-document-Document|json-memoryVectorStore_0-memoryVectorStore_0-input-document-Document"
},
{
"source": "cheerioWebScraper_0",
"sourceHandle": "cheerioWebScraper_0-output-document-Document|json",
"target": "memoryVectorStore_0",
"targetHandle": "memoryVectorStore_0-input-document-Document",
"type": "buttonedge",
"id": "cheerioWebScraper_0-cheerioWebScraper_0-output-document-Document|json-memoryVectorStore_0-memoryVectorStore_0-input-document-Document"
},
{
"source": "huggingFaceInferenceEmbeddings_0",
"sourceHandle": "huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings",
"target": "memoryVectorStore_0",
"targetHandle": "memoryVectorStore_0-input-embeddings-Embeddings",
"type": "buttonedge",
"id": "huggingFaceInferenceEmbeddings_0-huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings-memoryVectorStore_0-memoryVectorStore_0-input-embeddings-Embeddings"
},
{
"source": "chatMistralAI_0",
"sourceHandle": "chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseChatModel",
"type": "buttonedge",
"id": "chatMistralAI_0-chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseChatModel"
},
{
"source": "memoryVectorStore_0",
"sourceHandle": "memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
"type": "buttonedge",
"id": "memoryVectorStore_0-memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
},
{
"source": "bufferMemory_0",
"sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
"target": "conversationalRetrievalQAChain_0",
"targetHandle": "conversationalRetrievalQAChain_0-input-memory-BaseMemory",
"type": "buttonedge",
"id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-memory-BaseMemory"
}
]
} |