SushantGautam commited on
Commit
19caf6e
·
1 Parent(s): e76c86b
Files changed (5) hide show
  1. Docker +0 -22
  2. None +0 -0
  3. app.py +1 -0
  4. src/extractor.py +1 -1
  5. src/sql_chain.py +1 -1
Docker DELETED
@@ -1,22 +0,0 @@
1
- FROM python:3.11
2
- RUN useradd -m -u 1000 user
3
-
4
- WORKDIR /code
5
-
6
- RUN pip install soccernet
7
- RUN python -c "from SoccerNet.Downloader import SoccerNetDownloader; mySoccerNetDownloader = SoccerNetDownloader(LocalDirectory='data/dataset/SoccerNet'); mySoccerNetDownloader.downloadGames(files=['Labels-caption.json'], split=['train', 'valid', 'test']); mySoccerNetDownloader.downloadGames(files=['Labels-v2.json'], split=['train', 'valid', 'test'])"
8
- RUN python src/database.py
9
-
10
- COPY ./requirements.txt /code/requirements.txt
11
-
12
-
13
- RUN pip install -r /code/requirements.txt
14
-
15
- COPY . .
16
-
17
- COPY ".env_demo" ".env"
18
-
19
- RUN chmod -R 777 /code/
20
-
21
- CMD ["chainlit", "run", "-h", "app.py", "--port", "7860"]
22
- ENV INTERACTIVE_OPENAI_KEY=1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
None ADDED
Binary file (61.4 kB). View file
 
app.py CHANGED
@@ -56,6 +56,7 @@ async def on_chat_start():
56
  await cl.Message(
57
  content=f"❌Error: {e}. \n 🤗 Please Start new chat to set correct key.",
58
  ).send()
 
59
  await cl.ChatSettings([Select(id="Setting",label="Remove/change you OpenAI API Key?",values=["Click Confirm:"],)]).send()
60
 
61
  # ag = create_agent(llm_model = "gpt-4-0125-preview")
 
56
  await cl.Message(
57
  content=f"❌Error: {e}. \n 🤗 Please Start new chat to set correct key.",
58
  ).send()
59
+ return
60
  await cl.ChatSettings([Select(id="Setting",label="Remove/change you OpenAI API Key?",values=["Click Confirm:"],)]).send()
61
 
62
  # ag = create_agent(llm_model = "gpt-4-0125-preview")
src/extractor.py CHANGED
@@ -28,7 +28,7 @@ os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY')
28
  # os.environ["ANTHROPIC_API_KEY"] = os.getenv('ANTHROPIC_API_KEY')
29
 
30
  if os.getenv('LANGSMITH'):
31
- os.environ['LANGCHAIN_TRACING_V2'] = 'true'
32
  os.environ['LANGCHAIN_ENDPOINT'] = 'https://api.smith.langchain.com'
33
  os.environ[
34
  'LANGCHAIN_API_KEY'] = os.getenv("LANGSMITH_API_KEY")
 
28
  # os.environ["ANTHROPIC_API_KEY"] = os.getenv('ANTHROPIC_API_KEY')
29
 
30
  if os.getenv('LANGSMITH'):
31
+ os.environ['LANGCHAIN_TRACING_V2'] = 'false'
32
  os.environ['LANGCHAIN_ENDPOINT'] = 'https://api.smith.langchain.com'
33
  os.environ[
34
  'LANGCHAIN_API_KEY'] = os.getenv("LANGSMITH_API_KEY")
src/sql_chain.py CHANGED
@@ -25,7 +25,7 @@ logger = logging.getLogger(__name__)
25
  os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY')
26
 
27
  if os.getenv('LANGSMITH'):
28
- os.environ['LANGCHAIN_TRACING_V2'] = 'true'
29
  os.environ['LANGCHAIN_ENDPOINT'] = 'https://api.smith.langchain.com'
30
  os.environ[
31
  'LANGCHAIN_API_KEY'] = os.getenv("LANGSMITH_API_KEY")
 
25
  os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY')
26
 
27
  if os.getenv('LANGSMITH'):
28
+ os.environ['LANGCHAIN_TRACING_V2'] = 'false'
29
  os.environ['LANGCHAIN_ENDPOINT'] = 'https://api.smith.langchain.com'
30
  os.environ[
31
  'LANGCHAIN_API_KEY'] = os.getenv("LANGSMITH_API_KEY")