Basti-1995 commited on
Commit
1780113
·
1 Parent(s): 197a8c0

dynamic model definition

Browse files
Files changed (2) hide show
  1. agents/dummy_agent.py +2 -2
  2. app.py +4 -1
agents/dummy_agent.py CHANGED
@@ -14,11 +14,11 @@ class DummyState(TypedDict):
14
 
15
 
16
  class DummyAgent:
17
- def __init__(self, system_prompt_path: str = "prompts/system_prompt.txt"):
18
  print("LangGraph Chatbot Agent initialized.")
19
  self.system_prompt = self.read_system_prompt(system_prompt_path)
20
  self.llm = ChatOpenAI(
21
- model="gpt-3.5-turbo",
22
  temperature=0
23
  )
24
  graph = StateGraph(DummyState)
 
14
 
15
 
16
  class DummyAgent:
17
+ def __init__(self, system_prompt_path: str = "prompts/system_prompt.txt", model: str = "gpt-4o"):
18
  print("LangGraph Chatbot Agent initialized.")
19
  self.system_prompt = self.read_system_prompt(system_prompt_path)
20
  self.llm = ChatOpenAI(
21
+ model=model,
22
  temperature=0
23
  )
24
  graph = StateGraph(DummyState)
app.py CHANGED
@@ -10,7 +10,10 @@ from agents.dummy_agent import DummyAgent
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
  # >>>>>>>>>>>>>>>>>> Keep Constants as is <<<<<<<<<<<<<<<<<<<< #
12
 
13
- agent = DummyAgent(system_prompt_path="prompts/default_system_prompt.txt")
 
 
 
14
 
15
  def run_and_submit_all( profile: gr.OAuthProfile | None):
16
  """
 
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
  # >>>>>>>>>>>>>>>>>> Keep Constants as is <<<<<<<<<<<<<<<<<<<< #
12
 
13
+ agent = DummyAgent(
14
+ system_prompt_path="prompts/default_system_prompt.txt",
15
+ model="gpt-4o",
16
+ )
17
 
18
  def run_and_submit_all( profile: gr.OAuthProfile | None):
19
  """