pgurazada1 commited on
Commit
5c6ef06
·
verified ·
1 Parent(s): 8dae777

Update to GPT4o

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -10,8 +10,8 @@ ccms_db_loc = 'ccms.db'
10
 
11
  ccms_db = SQLDatabase.from_uri(f"sqlite:///{ccms_db_loc}")
12
 
13
- gpt4 = ChatOpenAI(
14
- model_name='gpt-4',
15
  api_key=os.environ["OPENAI_API_KEY"],
16
  temperature=0
17
  )
@@ -23,9 +23,10 @@ gpt35 = ChatOpenAI(
23
  )
24
 
25
  sqlite_agent = create_sql_agent(
26
- gpt4,
27
  db=ccms_db,
28
  agent_type="openai-tools",
 
29
  verbose=True
30
  )
31
 
 
10
 
11
  ccms_db = SQLDatabase.from_uri(f"sqlite:///{ccms_db_loc}")
12
 
13
+ gpt4o = ChatOpenAI(
14
+ model_name='gpt-4o',
15
  api_key=os.environ["OPENAI_API_KEY"],
16
  temperature=0
17
  )
 
23
  )
24
 
25
  sqlite_agent = create_sql_agent(
26
+ gpt4o,
27
  db=ccms_db,
28
  agent_type="openai-tools",
29
+ agent_executor_kwargs={'handle_parsing_errors':True},
30
  verbose=True
31
  )
32