Skip to content

Commit 09b7904

Browse files
committed
fix: synthetic conversation messages types
1 parent 68077a6 commit 09b7904

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/agents/llm_factory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from langchain_openai import ChatOpenAI
88
from langchain_openai import OpenAIEmbeddings
99
from langchain_google_genai import ChatGoogleGenerativeAI
10+
from dotenv import load_dotenv
11+
load_dotenv()
1012

1113
class AzureLLMs:
1214
def __init__(self, temperature: int = 0):

src/agents/utils/synthetic_conversation_generation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ def generate_synthetic_conversations(raw_text: str, num_turns: int, student_agen
7979
# Student starts
8080
student_response = invoke_student_agent(message, conversation_history[:-1], summary, student_agent_type, question_response_details_prompt, conversation_id)
8181
conversation_history.append({
82-
"role": "assistant",
82+
"role": "user",
8383
"content": student_response["output"]
8484
})
8585
else:
86-
tutor_response = invoke_tutor_agent(message, conversation_history[:-1], summary, conversational_style, question_response_details_prompt, conversation_id)
86+
tutor_response = invoke_tutor_agent(message, conversation_history, summary, conversational_style, question_response_details_prompt, conversation_id)
8787
conversation_history.append({
8888
"role": "assistant",
8989
"content": tutor_response["output"]

0 commit comments

Comments
 (0)