mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Feat: Add current working directory to LLM instructions (#9718)
This commit is contained in:
@@ -198,6 +198,7 @@ class Memory:
|
||||
conversation_instructions=self.conversation_instructions.content
|
||||
if self.conversation_instructions is not None
|
||||
else '',
|
||||
working_dir=self.runtime_info.working_dir if self.runtime_info else '',
|
||||
)
|
||||
return obs
|
||||
return None
|
||||
@@ -332,6 +333,7 @@ class Memory:
|
||||
self,
|
||||
runtime: Runtime,
|
||||
custom_secrets_descriptions: dict[str, str],
|
||||
working_dir: str,
|
||||
) -> None:
|
||||
"""Store runtime info (web hosts, ports, etc.)."""
|
||||
# e.g. { '127.0.0.1': 8080 }
|
||||
@@ -344,11 +346,13 @@ class Memory:
|
||||
additional_agent_instructions=runtime.additional_agent_instructions,
|
||||
date=date,
|
||||
custom_secrets_descriptions=custom_secrets_descriptions,
|
||||
working_dir=working_dir,
|
||||
)
|
||||
else:
|
||||
self.runtime_info = RuntimeInfo(
|
||||
date=date,
|
||||
custom_secrets_descriptions=custom_secrets_descriptions,
|
||||
working_dir=working_dir,
|
||||
)
|
||||
|
||||
def set_conversation_instructions(
|
||||
|
||||
Reference in New Issue
Block a user