mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
Refactor to clean up and move utility/legacy out of the agent (#7917)
This commit is contained in:
@@ -57,10 +57,10 @@ class PromptManager:
|
||||
return self.system_template.render().strip()
|
||||
|
||||
def get_example_user_message(self) -> str:
|
||||
"""This is the initial user message provided to the agent
|
||||
"""This is an initial user message that can be provided to the agent
|
||||
before *actual* user instructions are provided.
|
||||
|
||||
It is used to provide a demonstration of how the agent
|
||||
It can be used to provide a demonstration of how the agent
|
||||
should behave in order to solve the user's task. And it may
|
||||
optionally contain some additional context about the user's task.
|
||||
These additional context will convert the current generic agent
|
||||
@@ -69,14 +69,6 @@ class PromptManager:
|
||||
|
||||
return self.user_template.render().strip()
|
||||
|
||||
def add_examples_to_initial_message(self, message: Message) -> None:
|
||||
"""Add example_message to the first user message."""
|
||||
example_message = self.get_example_user_message() or None
|
||||
|
||||
# Insert it at the start of the TextContent list
|
||||
if example_message:
|
||||
message.content.insert(0, TextContent(text=example_message))
|
||||
|
||||
def build_workspace_context(
|
||||
self,
|
||||
repository_info: RepositoryInfo | None,
|
||||
|
||||
Reference in New Issue
Block a user