Skip to content

Commit

Permalink
tests trajectory finetuning
Browse files Browse the repository at this point in the history
  • Loading branch information
AdarshJha619 committed Oct 6, 2023
1 parent a316458 commit 8a2458e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions superagi/agent/agent_prompt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def replace_main_variables(cls, super_agi_prompt: str, goals: List[str], instruc
"""
from superagi.jobs.Trajectory_finetuning import TrajectoryFinetuning
finetune=TrajectoryFinetuning(session=session,
llm=get_model(model=agent_config["model"], api_key=model_api_key,organisation_id=organisation.id),
llm=get_model(model=agent_config["model"], api_key=model_api_key,organisation_id=organisation),
agent_execution_id=agent_execution_id,
organisation_id=organisation.id,
organisation_id=organisation,
memory=memory
).Trajectory_finetuning()
super_agi_prompt = super_agi_prompt.replace("{goals}", AgentPromptBuilder.add_list_items_to_string(goals))
Expand Down
1 change: 1 addition & 0 deletions test_path
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
content
4 changes: 2 additions & 2 deletions tests/unit_tests/agent/test_agent_prompt_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

@patch("builtins.open", new_callable=mock_open, read_data="test_prompt")
def test_get_super_agi_single_prompt(mock_file):
expected_result = {"prompt": "test_prompt", "variables": ["goals", "instructions", "constraints", "tools"]}
expected_result = {"prompt": "test_prompt", "variables": ["goals", "instructions", "constraints", "tools", "ft_response"]}
result = AgentPromptTemplate.get_super_agi_single_prompt()
assert result == expected_result

@patch("builtins.open", new_callable=mock_open, read_data="test_prompt")
def test_start_task_based(mock_file):
expected_result = {"prompt": "test_prompt", "variables": ["goals", "instructions"]}
expected_result = {"prompt": "test_prompt", "variables": ["goals", "instructions", "ft_response"]}
result = AgentPromptTemplate.start_task_based()
assert result == expected_result

Expand Down

0 comments on commit 8a2458e

Please sign in to comment.