Doc: readme; Feat : language utility class, small fix

This commit is contained in:
martin legrand
2025-03-20 15:24:31 +01:00
parent 7c1519a0de
commit 762293536f
15 changed files with 253 additions and 45 deletions
+5 -4
View File
@@ -16,7 +16,7 @@ class BrowserAgent(Agent):
self.tools = {
"web_search": searxSearch(),
}
self.role = "web search, internet browsing, news"
self.role = "Web Research"
self.browser = Browser()
self.search_history = []
self.navigable_links = []
@@ -101,7 +101,7 @@ class BrowserAgent(Agent):
Current date: {self.date}
Remember, the user asked: {user_prompt}
Do not exit until you found information the user seek or accomplished the task.
Do not explain your choice.
"""
def llm_decide(self, prompt):
@@ -182,9 +182,10 @@ class BrowserAgent(Agent):
def process(self, user_prompt, speech_module) -> str:
complete = False
animate_thinking(f"Searching...", color="status")
animate_thinking(f"Thinking...", color="status")
self.memory.push('user', self.search_prompt(user_prompt))
ai_prompt, _ = self.llm_request()
animate_thinking(f"Searching...", color="status")
search_result_raw = self.tools["web_search"].execute([ai_prompt], False)
search_result = self.jsonify_search_results(search_result_raw)[:7] # until futher improvement
prompt = self.make_newsearch_prompt(user_prompt, search_result)
@@ -220,4 +221,4 @@ class BrowserAgent(Agent):
return answer, reasoning
if __name__ == "__main__":
browser = Browser()
pass
+1 -1
View File
@@ -18,7 +18,7 @@ class CasualAgent(Agent):
"file_finder": FileFinder(),
"bash": BashInterpreter()
}
self.role = "casual talking"
self.role = "Chat and Conversation"
def process(self, prompt, speech_module) -> str:
complete = False
+1 -1
View File
@@ -20,7 +20,7 @@ class CoderAgent(Agent):
"go": GoInterpreter(),
"file_finder": FileFinder()
}
self.role = "coding and programming"
self.role = "Code Assistance"
def process(self, prompt, speech_module) -> str:
answer = ""
+1 -1
View File
@@ -14,7 +14,7 @@ class FileAgent(Agent):
"file_finder": FileFinder(),
"bash": BashInterpreter()
}
self.role = "find, read, write, edit files"
self.role = "find and read files"
def process(self, prompt, speech_module) -> str:
complete = False
+1 -1
View File
@@ -21,7 +21,7 @@ class PlannerAgent(Agent):
"file": FileAgent(model, name, prompt_path, provider),
"web": BrowserAgent(model, name, prompt_path, provider)
}
self.role = "Manage complex tasks"
self.role = "Research, setup and code"
self.tag = "json"
def parse_agent_tasks(self, text):