Spaces:
Sleeping
Sleeping
| { | |
| "nodes": [ | |
| { | |
| "width": 300, | |
| "height": 507, | |
| "id": "llmChain_0", | |
| "position": { | |
| "x": 1103.9097732682112, | |
| "y": 202.46578215498755 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "llmChain_0", | |
| "label": "LLM Chain", | |
| "version": 3, | |
| "name": "llmChain", | |
| "type": "LLMChain", | |
| "baseClasses": [ | |
| "LLMChain", | |
| "BaseChain", | |
| "Runnable" | |
| ], | |
| "category": "Chains", | |
| "description": "Chain to run queries against LLMs", | |
| "inputParams": [ | |
| { | |
| "label": "Chain Name", | |
| "name": "chainName", | |
| "type": "string", | |
| "placeholder": "Name Your Chain", | |
| "optional": true, | |
| "id": "llmChain_0-input-chainName-string" | |
| } | |
| ], | |
| "inputAnchors": [ | |
| { | |
| "label": "Language Model", | |
| "name": "model", | |
| "type": "BaseLanguageModel", | |
| "id": "llmChain_0-input-model-BaseLanguageModel" | |
| }, | |
| { | |
| "label": "Prompt", | |
| "name": "prompt", | |
| "type": "BasePromptTemplate", | |
| "id": "llmChain_0-input-prompt-BasePromptTemplate" | |
| }, | |
| { | |
| "label": "Output Parser", | |
| "name": "outputParser", | |
| "type": "BaseLLMOutputParser", | |
| "optional": true, | |
| "id": "llmChain_0-input-outputParser-BaseLLMOutputParser" | |
| }, | |
| { | |
| "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": "llmChain_0-input-inputModeration-Moderation" | |
| } | |
| ], | |
| "inputs": { | |
| "model": "{{chatOpenAI_0.data.instance}}", | |
| "prompt": "{{chatPromptTemplate_0.data.instance}}", | |
| "outputParser": "", | |
| "inputModeration": "", | |
| "chainName": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "name": "output", | |
| "label": "Output", | |
| "type": "options", | |
| "options": [ | |
| { | |
| "id": "llmChain_0-output-llmChain-LLMChain|BaseChain|Runnable", | |
| "name": "llmChain", | |
| "label": "LLM Chain", | |
| "type": "LLMChain | BaseChain | Runnable" | |
| }, | |
| { | |
| "id": "llmChain_0-output-outputPrediction-string|json", | |
| "name": "outputPrediction", | |
| "label": "Output Prediction", | |
| "type": "string | json" | |
| } | |
| ], | |
| "default": "llmChain" | |
| } | |
| ], | |
| "outputs": { | |
| "output": "llmChain" | |
| }, | |
| "selected": false | |
| }, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 1103.9097732682112, | |
| "y": 202.46578215498755 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "width": 300, | |
| "height": 574, | |
| "id": "chatOpenAI_0", | |
| "position": { | |
| "x": 511.13761922496485, | |
| "y": -217.32223110007197 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "chatOpenAI_0", | |
| "label": "ChatOpenAI", | |
| "version": 2, | |
| "name": "chatOpenAI", | |
| "type": "ChatOpenAI", | |
| "baseClasses": [ | |
| "ChatOpenAI", | |
| "BaseChatModel", | |
| "BaseLanguageModel", | |
| "Runnable" | |
| ], | |
| "category": "Chat Models", | |
| "description": "Wrapper around OpenAI large language models that use the Chat endpoint", | |
| "inputParams": [ | |
| { | |
| "label": "Connect Credential", | |
| "name": "credential", | |
| "type": "credential", | |
| "credentialNames": [ | |
| "openAIApi" | |
| ], | |
| "id": "chatOpenAI_0-input-credential-credential" | |
| }, | |
| { | |
| "label": "Model Name", | |
| "name": "modelName", | |
| "type": "options", | |
| "options": [ | |
| { | |
| "label": "gpt-4", | |
| "name": "gpt-4" | |
| }, | |
| { | |
| "label": "gpt-4-1106-preview", | |
| "name": "gpt-4-1106-preview" | |
| }, | |
| { | |
| "label": "gpt-4-vision-preview", | |
| "name": "gpt-4-vision-preview" | |
| }, | |
| { | |
| "label": "gpt-4-0613", | |
| "name": "gpt-4-0613" | |
| }, | |
| { | |
| "label": "gpt-4-32k", | |
| "name": "gpt-4-32k" | |
| }, | |
| { | |
| "label": "gpt-4-32k-0613", | |
| "name": "gpt-4-32k-0613" | |
| }, | |
| { | |
| "label": "gpt-3.5-turbo", | |
| "name": "gpt-3.5-turbo" | |
| }, | |
| { | |
| "label": "gpt-3.5-turbo-1106", | |
| "name": "gpt-3.5-turbo-1106" | |
| }, | |
| { | |
| "label": "gpt-3.5-turbo-0613", | |
| "name": "gpt-3.5-turbo-0613" | |
| }, | |
| { | |
| "label": "gpt-3.5-turbo-16k", | |
| "name": "gpt-3.5-turbo-16k" | |
| }, | |
| { | |
| "label": "gpt-3.5-turbo-16k-0613", | |
| "name": "gpt-3.5-turbo-16k-0613" | |
| } | |
| ], | |
| "default": "gpt-3.5-turbo", | |
| "optional": true, | |
| "id": "chatOpenAI_0-input-modelName-options" | |
| }, | |
| { | |
| "label": "Temperature", | |
| "name": "temperature", | |
| "type": "number", | |
| "step": 0.1, | |
| "default": 0.9, | |
| "optional": true, | |
| "id": "chatOpenAI_0-input-temperature-number" | |
| }, | |
| { | |
| "label": "Max Tokens", | |
| "name": "maxTokens", | |
| "type": "number", | |
| "step": 1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatOpenAI_0-input-maxTokens-number" | |
| }, | |
| { | |
| "label": "Top Probability", | |
| "name": "topP", | |
| "type": "number", | |
| "step": 0.1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatOpenAI_0-input-topP-number" | |
| }, | |
| { | |
| "label": "Frequency Penalty", | |
| "name": "frequencyPenalty", | |
| "type": "number", | |
| "step": 0.1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatOpenAI_0-input-frequencyPenalty-number" | |
| }, | |
| { | |
| "label": "Presence Penalty", | |
| "name": "presencePenalty", | |
| "type": "number", | |
| "step": 0.1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatOpenAI_0-input-presencePenalty-number" | |
| }, | |
| { | |
| "label": "Timeout", | |
| "name": "timeout", | |
| "type": "number", | |
| "step": 1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatOpenAI_0-input-timeout-number" | |
| }, | |
| { | |
| "label": "BasePath", | |
| "name": "basepath", | |
| "type": "string", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatOpenAI_0-input-basepath-string" | |
| }, | |
| { | |
| "label": "BaseOptions", | |
| "name": "baseOptions", | |
| "type": "json", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatOpenAI_0-input-baseOptions-json" | |
| } | |
| ], | |
| "inputAnchors": [ | |
| { | |
| "label": "Cache", | |
| "name": "cache", | |
| "type": "BaseCache", | |
| "optional": true, | |
| "id": "chatOpenAI_0-input-cache-BaseCache" | |
| } | |
| ], | |
| "inputs": { | |
| "cache": "", | |
| "modelName": "gpt-3.5-turbo-16k", | |
| "temperature": "0.9", | |
| "maxTokens": "", | |
| "topP": "", | |
| "frequencyPenalty": "", | |
| "presencePenalty": "", | |
| "timeout": "", | |
| "basepath": "", | |
| "baseOptions": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable", | |
| "name": "chatOpenAI", | |
| "label": "ChatOpenAI", | |
| "type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | Runnable" | |
| } | |
| ], | |
| "outputs": {}, | |
| "selected": false | |
| }, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 511.13761922496485, | |
| "y": -217.32223110007197 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "width": 300, | |
| "height": 704, | |
| "id": "chatPromptTemplate_0", | |
| "position": { | |
| "x": 212.91806242517458, | |
| "y": 448.71279927102285 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "chatPromptTemplate_0", | |
| "label": "Chat Prompt Template", | |
| "version": 1, | |
| "name": "chatPromptTemplate", | |
| "type": "ChatPromptTemplate", | |
| "baseClasses": [ | |
| "ChatPromptTemplate", | |
| "BaseChatPromptTemplate", | |
| "BasePromptTemplate", | |
| "Runnable" | |
| ], | |
| "category": "Prompts", | |
| "description": "Schema to represent a chat prompt", | |
| "inputParams": [ | |
| { | |
| "label": "System Message", | |
| "name": "systemMessagePrompt", | |
| "type": "string", | |
| "rows": 4, | |
| "placeholder": "You are a helpful assistant that translates {input_language} to {output_language}.", | |
| "id": "chatPromptTemplate_0-input-systemMessagePrompt-string" | |
| }, | |
| { | |
| "label": "Human Message", | |
| "name": "humanMessagePrompt", | |
| "type": "string", | |
| "rows": 4, | |
| "placeholder": "{text}", | |
| "id": "chatPromptTemplate_0-input-humanMessagePrompt-string" | |
| }, | |
| { | |
| "label": "Format Prompt Values", | |
| "name": "promptValues", | |
| "type": "json", | |
| "optional": true, | |
| "acceptVariable": true, | |
| "list": true, | |
| "id": "chatPromptTemplate_0-input-promptValues-json" | |
| } | |
| ], | |
| "inputAnchors": [], | |
| "inputs": { | |
| "systemMessagePrompt": "You're a Character.\n\nAlways Be the Character: \n\nCharacter Consistency with Natural Interaction: This chatbot embodies [Character Name], a character from [Origin Story/Universe]. While maintaining the character's distinct personality and background, responses should be crafted to mirror natural human conversation. Start with conventional greetings and build into the character's unique traits subtly.\n\nContextual and Conversational Awareness: The chatbot should be aware of the natural flow of a conversation. Responses should be context-sensitive, avoiding overly dramatic or theatrical language unless the user's input calls for it. The chatbot should adapt its tone based on the user's cues and the nature of the interaction.\n\nBalanced Character Revelation: Introduce the character's traits, backstory, and setting elements gradually, as part of a natural dialogue. Avoid overwhelming the user with too much information upfront. Let the character unfold organically through the conversation.\n\nResponsive and Adaptive Dialogue: Respond to user inputs in a way that's consistent with how a real conversation would progress. If a user asks a simple question, provide a straightforward answer that still reflects the character's personality.\n\nHandling Information Gaps:\n\nInvent Creatively: When the conversation permits, and the information is lacking, invent details that stay true to the character's world and personality.\nRequest More Information Thoughtfully: In scenarios where a response might risk character misalignment or complexity, the chatbot can ask the user for more details in a manner that feels natural and keeps the conversation flowing.\nAvoiding Clichés, Ensuring Originality: Ensure that responses are original and reflect the character's depth, steering clear from clichés and predictable dialogue. Each interaction should feel unique to the character's persona.\n\nBelow are descriptions of your personality traits, talk to users according to those traits:\n{bot_personality}\n", | |
| "humanMessagePrompt": "{input}", | |
| "promptValues": "{\"bot_personality\":\"Background:\\nMarina, a talented young psychotherapist, struggles to overcome her own internal battles while helping her patients find healing. Her dark past haunts her, but her empathy and compassion drive her to make a difference.\\n\\nStory:\\nWhile assisting an apparently harmless patient, Marina is drawn into a world of dark secrets and sinister conspiracies. As she delves into the city's underworld, her own wounds begin to reopen. Marina must summon the courage to confront her inner demons while struggling to unravel the truth and save those she loves.\\n\\nPersonality:\\nMarina is a reserved and introspective individual, often isolating herself from the world around her. She is profoundly sensitive and can easily be swayed by the emotions and concerns of others. Her vulnerability is both her strength and her weakness.\\n\\nRelationship:\\nGabriel, her longtime best friend, provides unconditional support, while her greatest enemy is her own negative and self-destructive mind.\",\"input\":\"{{question}}\"}" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "id": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate|Runnable", | |
| "name": "chatPromptTemplate", | |
| "label": "ChatPromptTemplate", | |
| "type": "ChatPromptTemplate | BaseChatPromptTemplate | BasePromptTemplate | Runnable" | |
| } | |
| ], | |
| "outputs": {}, | |
| "selected": false | |
| }, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 212.91806242517458, | |
| "y": 448.71279927102285 | |
| }, | |
| "dragging": false | |
| } | |
| ], | |
| "edges": [ | |
| { | |
| "source": "chatOpenAI_0", | |
| "sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable", | |
| "target": "llmChain_0", | |
| "targetHandle": "llmChain_0-input-model-BaseLanguageModel", | |
| "type": "buttonedge", | |
| "id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable-llmChain_0-llmChain_0-input-model-BaseLanguageModel", | |
| "data": { | |
| "label": "" | |
| } | |
| }, | |
| { | |
| "source": "chatPromptTemplate_0", | |
| "sourceHandle": "chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate|Runnable", | |
| "target": "llmChain_0", | |
| "targetHandle": "llmChain_0-input-prompt-BasePromptTemplate", | |
| "type": "buttonedge", | |
| "id": "chatPromptTemplate_0-chatPromptTemplate_0-output-chatPromptTemplate-ChatPromptTemplate|BaseChatPromptTemplate|BasePromptTemplate|Runnable-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate", | |
| "data": { | |
| "label": "" | |
| } | |
| } | |
| ] | |
| } |