Skip to content

Building AI agents, atomically

modify example

Kenny Vaneetvelde95465a64f36c
diff --git a/atomic_agents_new/examples/article_idea_outline_gen_with_search.py b/atomic_agents_new/examples/article_idea_outline_gen_with_search.py
index 006c78c..181399e 100644
--- a/atomic_agents_new/examples/article_idea_outline_gen_with_search.py
+++ b/atomic_agents_new/examples/article_idea_outline_gen_with_search.py
@@ -13,7 +13,7 @@ console = Console()
class MyChatAgent(BasicChatAgent):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
- self.search_tool = SearxNGSearchTool(max_results=15)
+ self.search_tool = SearxNGSearchTool(max_results=25)
def _pre_run(self):
self.memory.add_message('assistant', 'First, I will perform a search with 3 different search queries to gather relevant information on the topic.')
@@ -68,13 +68,13 @@ system_prompt = SystemPromptInfo(
output_instructions=[
'Ensure each idea is clearly numbered from 1 to 10.',
'Output the list of ideas and the article outline in human-readable Markdown format.',
- 'Do not include any additional text or confirmation messages; only provide the list of ideas and the article outline.',
- 'Do not reply to the user\'s input with anything except the list of ideas and the article outline.'
+ 'Include a list of the most promising-looking URLs for further research at the end of the response as a markdown list.',
+ 'Do not include any additional text or confirmation messages; only provide the list of ideas, the article outline, and the URLs.',
+ 'Do not reply to the user\'s input with anything except the list of ideas, the article outline, and the URLs.'
]
)
system_prompt_generator = SystemPromptGenerator(system_prompt, dynamic_info_providers)
-
memory = ChatMemory()
initial_memory = [
{'role': 'assistant', 'content': 'Hello! I\'m an AI assistant that can help you brainstorm ideas and generate article outlines. Please provide me with a topic to get started.'}
@@ -83,7 +83,7 @@ memory.load_from_dict_list(initial_memory)
agent = MyChatAgent(
client=instructor.from_openai(openai.OpenAI()),
- # system_prompt_generator=system_prompt_generator,
+ system_prompt_generator=system_prompt_generator,
model='gpt-3.5-turbo',
memory=memory,
)