Skip to content

Commit

Permalink
viz updates (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedpfeiffer authored Jun 18, 2024
1 parent 4cd1212 commit 791006a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file modified viz/backend/requirements.txt
Binary file not shown.
5 changes: 3 additions & 2 deletions viz/backend/sqlchain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from langchain import OpenAI, SQLDatabase, SQLDatabaseChain
from langchain import SQLDatabase, SQLDatabaseChain
from langchain.chat_models import ChatOpenAI
import config
from langchain.output_parsers import CommaSeparatedListOutputParser
from langchain.prompts import PromptTemplate, ChatPromptTemplate, HumanMessagePromptTemplate
Expand All @@ -7,7 +8,7 @@


def sqlchain(input_text):
llm = OpenAI(openai_api_key=config.openai_key,
llm = ChatOpenAI(openai_api_key=config.openai_key,
model_name="gpt-3.5-turbo", temperature=0, verbose=True)
db = SQLDatabase.from_uri(
f"postgresql+psycopg2://postgres:{config.sql_key}@localhost:5432/{config.database_name}")
Expand Down
1 change: 0 additions & 1 deletion viz/data/jsontocsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def getBus(data):
"kilovolt levels": set(p["KVlevels"]),
"number of buses": p["nbus"],
"vm": p["Vm"],
"start": p["start"],
})

keys = points[0].keys()
Expand Down

0 comments on commit 791006a

Please sign in to comment.