equilink-site/code_diagrams/tutorial_diagrams/3_agent_character_sheet.codediagram

1 line
25 KiB
Plaintext
Raw Permalink Normal View History

2025-02-12 17:38:06 +05:30
{"id":-1,"name":"Onboarding diagram","userId":-1,"createdAt":"","updatedAt":"","content":{"items":[{"uid":"lW0CrByFpI","position":{"x":-680,"y":800},"sizes":{"width":399.75,"height":223.921875},"autoheight":true,"blockContent":{"content":[{"type":"filePathNode","attrs":{"pathToFile":"","version":1},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"main.py"}]},{"type":"codeBlock","attrs":{"language":"python","wrapCode":true},"content":[{"type":"text","text":"# Instantiate your AI model\r\nai_model = GeminiModel()\r\n\n# call step 1\r\nnext_step.step_1(ai_model, debug=False)"}]}]},"nodeType":"block"},{"uid":"RuCwNpe8rs","position":{"x":-680,"y":630},"sizes":{"width":399.75,"height":104.953125},"autoheight":true,"blockContent":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"We setup our AI Model, and create our Agent Character Sheet that will help the AI make the Twitter posts."}]}]},"color":{"bgColor":"#2b313a","bgName":"black"},"nodeType":"block"},{"uid":"24FHjKbcb4","position":{"x":-100,"y":820},"sizes":{"width":399.75,"height":171.4375},"autoheight":true,"blockContent":{"type":"doc","content":[{"type":"filePathNode","attrs":{"pathToFile":"","version":1},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"step_1.py"}]},{"type":"codeBlock","attrs":{"language":"python","wrapCode":true},"content":[{"type":"text","text":"def step_1(ai_model, debug=False):\r\n"}]}]},"nodeType":"block"},{"uid":"aPeP7UA4jx","position":{"x":-100,"y":620},"sizes":{"width":399.75,"height":153.9375},"autoheight":true,"blockContent":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"We have a debug feature that can be turned on and off to help people track down what is going wrong."}]},{"type":"paragraph","content":[{"type":"text","text":"This could also be a separate tests file that is run rather than cluttering up the code here."}]}]},"nodeType":"block"},{"uid":"errABHj0Ma","position":{"x":-130,"y":1260},"sizes":{"width":479.75,"height":381.390625},"autoheight":true,"blockContent":{"type":"doc","content":[{"type":"filePathNode","attrs":{"pathToFile":"","version":1},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"step_1.py"}]},{"type":"codeBlock","attrs":{"language":"python","wrapCode":true},"content":[{"type":"text","text":"# prompt 1 Character Creation:\r\n# step 1.1: Generate a new agent name, topic, personality, and communication style with the prompt_1 template\r\nprompt_1_vars = {\r\n # \"agent_name\": \"\",\r\n # \"personality\": \"\",\r\n # \"communication_style\": \"\",\r\n # \"topic\": \"\",\n \"concept\": \"alien drone pilot who is a sarcastic asshole visiting earth to report back his findings to his home planet\",\n \"agent_yaml\": yaml.dump(agent)\r\n}\r\n"}]}]},"nodeType":"block"},{"uid":"cgbqTXNQi1","position":{"x":-110,"y":1720},"sizes":{"width":439.78125,"height":146.9375},"autoheight":true,"blockContent":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"The following is the prompt that has been changed countless times to ensure the AI is returning a yaml file consistently that is valid, as well as the contents of the yaml file that is our secret sauce to the Agent and what it will use to make posts."}]}]},"nodeType":"block"},{"uid":"flbOA-v9zK","position":{"x":-1070,"y":1250},"sizes":{"width":399.765625,"height":416.390625},"autoheight":true,"blockContent":{"content":[{"type":"filePathNode","attrs":{"pathToFile":"","version":1},"content":[{"type":"text","marks":[{"type":"bold"}],"text":"templates\\agent_template.yaml"}]},{"type":"codeBlock","attrs":{"language":"yaml","wrapCode":true},"content":[{"type":"text","text":"name:\r\npersonality:\r\ncommunication_style:\r\nbackstory:\r\nuniverse:\r\ntopic_expertise:\r\nhashtags: []\r\nemojis: []\r\nmodel_type: \"gemini\"\r\nmodel_name: \"gemini-exp-1206\"\r\nmemory_store: \"gemini_chroma\"\r\nconnectors:\r\n twitter: true\r\n telegram: false\r\n discord: false\r\n"}]}]},"nodeType":"block"},{"uid":"bk2x5x3hCZ","position":{"x":-90,"y":1060},"sizes":{"wi