binaychandra commited on
Commit
e6f9ae7
·
1 Parent(s): e70ee47

Trying fix chromadb issue

Browse files
Files changed (1) hide show
  1. langchain_helper.py +4 -1
langchain_helper.py CHANGED
@@ -15,6 +15,7 @@ from sqlalchemy import create_engine
15
  from project_prompts import sqlite_prompt
16
  from few_shots import few_shots
17
  import pandas as pd
 
18
  import plotly
19
  import plotly.express as px
20
  from plotly.express import bar, line, scatter, area, pie
@@ -22,6 +23,8 @@ from plotly.express import bar, line, scatter, area, pie
22
  # from dotenv import load_dotenv
23
  # load_dotenv()
24
 
 
 
25
  from dotenv import load_dotenv, find_dotenv
26
  _ = load_dotenv(find_dotenv()) # read local .env file
27
 
@@ -77,7 +80,7 @@ def get_few_shot_db_chain(user_message):
77
 
78
 
79
  def get_graph_details(usermessage:str, df=None):
80
- llm = AzureOpenAI(deployment_name="gpt-35-turbo-instruct", temperature=0.15)
81
  template = ChatPromptTemplate.from_messages(
82
  [("system", "You are a visualisation expert and plotly developer, your task is to come up with best suitable \
83
  chart representing user ask for the given data. please use plotly express library in python for \
 
15
  from project_prompts import sqlite_prompt
16
  from few_shots import few_shots
17
  import pandas as pd
18
+ import chromadb
19
  import plotly
20
  import plotly.express as px
21
  from plotly.express import bar, line, scatter, area, pie
 
23
  # from dotenv import load_dotenv
24
  # load_dotenv()
25
 
26
+ chromadb.api.client.SharedSystemClient.clear_system_cache()
27
+
28
  from dotenv import load_dotenv, find_dotenv
29
  _ = load_dotenv(find_dotenv()) # read local .env file
30
 
 
80
 
81
 
82
  def get_graph_details(usermessage:str, df=None):
83
+ llm = ChatOpenAI(deployment_name=current_model_id, temperature=0.15)
84
  template = ChatPromptTemplate.from_messages(
85
  [("system", "You are a visualisation expert and plotly developer, your task is to come up with best suitable \
86
  chart representing user ask for the given data. please use plotly express library in python for \