robertselvam commited on
Commit
51e24bb
·
verified ·
1 Parent(s): 6808403

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -15,6 +15,7 @@ from PyPDF2 import PdfReader
15
  import re
16
  import plotly.graph_objects as go
17
  import csv
 
18
 
19
 
20
  # Configure logging
@@ -158,7 +159,7 @@ class JobPotral:
158
  docs = knowledge_base.similarity_search(question)
159
 
160
  # Initialize the OpenAILLM model
161
- llm = OpenAILLM()
162
 
163
  # Load a question-answering chain of models
164
  chain = load_qa_chain(llm, chain_type="stuff")
@@ -289,7 +290,7 @@ class JobPotral:
289
 
290
  # Call OpenAI GPT-3.5-turbo
291
  chat_completion = self.client.chat.completions.create(
292
- model = "gpt-3.5-turbo",
293
  messages = conversation,
294
  max_tokens=500,
295
  temperature=0
@@ -509,7 +510,7 @@ class JobPotral:
509
  # Construct the prompt for OpenAI API
510
  # Call OpenAI API with the given prompt
511
  response = self.client.chat.completions.create(
512
- model="gpt-3.5-turbo", # You can use a different engine
513
  messages=prompt_template_,
514
  max_tokens=200,
515
  temperature = 0,
 
15
  import re
16
  import plotly.graph_objects as go
17
  import csv
18
+ from langchain_openai import AzureChatOpenAI
19
 
20
 
21
  # Configure logging
 
159
  docs = knowledge_base.similarity_search(question)
160
 
161
  # Initialize the OpenAILLM model
162
+ llm = AzureChatOpenAI()
163
 
164
  # Load a question-answering chain of models
165
  chain = load_qa_chain(llm, chain_type="stuff")
 
290
 
291
  # Call OpenAI GPT-3.5-turbo
292
  chat_completion = self.client.chat.completions.create(
293
+ model = "ChatGPT",
294
  messages = conversation,
295
  max_tokens=500,
296
  temperature=0
 
510
  # Construct the prompt for OpenAI API
511
  # Call OpenAI API with the given prompt
512
  response = self.client.chat.completions.create(
513
+ model="ChatGPT", # You can use a different engine
514
  messages=prompt_template_,
515
  max_tokens=200,
516
  temperature = 0,