Spaces:
Sleeping
Sleeping
pgurazada1
commited on
Update to GPT4o
Browse files
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 |
-
|
14 |
-
model_name='gpt-
|
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 |
-
|
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 |
|