Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/agents/llm_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from langchain_openai import ChatOpenAI
from langchain_openai import OpenAIEmbeddings
from langchain_google_genai import ChatGoogleGenerativeAI
from dotenv import load_dotenv
load_dotenv()

class AzureLLMs:
def __init__(self, temperature: int = 0):
Expand Down
6 changes: 4 additions & 2 deletions src/agents/utils/synthetic_conversation_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ def generate_synthetic_conversations(raw_text: str, num_turns: int, student_agen
# Student starts
student_response = invoke_student_agent(message, conversation_history[:-1], summary, student_agent_type, question_response_details_prompt, conversation_id)
conversation_history.append({
"role": "assistant",
"role": "user",
"content": student_response["output"]
})
else:
tutor_response = invoke_tutor_agent(message, conversation_history[:-1], summary, conversational_style, question_response_details_prompt, conversation_id)
tutor_response = invoke_tutor_agent(message, conversation_history, summary, conversational_style, question_response_details_prompt, conversation_id)
conversation_history.append({
"role": "assistant",
"content": tutor_response["output"]
Expand All @@ -97,6 +97,8 @@ def generate_synthetic_conversations(raw_text: str, num_turns: int, student_agen
# Save Conversation
conversation_output = {
"conversation_id": conversation_id+"_"+student_agent_type+"_"+tutor_agent_type+"_synthetic",
"student_agent_type": student_agent_type,
"tutor_agent_type": tutor_agent_type,
"conversation": conversation_history
}
return conversation_output
Expand Down