mayankchugh-learning commited on
Commit
f6b3435
1 Parent(s): 0918b7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -17,13 +17,14 @@ from dotenv import load_dotenv
17
  # Create Client
18
  load_dotenv()
19
 
20
- os.environ["ANYSCALE_API_KEY"]=os.getenv("ANYSCALE_API_KEY")
21
 
22
  client = OpenAI(
23
- base_url="https://api.endpoints.anyscale.com/v1",
24
- api_key=os.environ['ANYSCALE_API_KEY']
25
  )
26
 
 
27
  embedding_model = SentenceTransformerEmbeddings(model_name='thenlper/gte-large')
28
  # Define the embedding model and the vectorstore
29
 
@@ -111,7 +112,7 @@ def predict(user_input,company):
111
  # Get response from the LLM
112
  try:
113
  response = client.chat.completions.create(
114
- model='mistralai/Mixtral-8x7B-Instruct-v0.1',
115
  messages=prompt,
116
  temperature=0
117
  )
 
17
  # Create Client
18
  load_dotenv()
19
 
20
+ os.environ["FIREWORKS_AI_API_KEY"]=os.getenv("FIREWORKS_AI_API_KEY")
21
 
22
  client = OpenAI(
23
+ base_url="https://api.fireworks.ai/inference/v1",
24
+ api_key=os.environ['FIREWORKS_AI_API_KEY']
25
  )
26
 
27
+
28
  embedding_model = SentenceTransformerEmbeddings(model_name='thenlper/gte-large')
29
  # Define the embedding model and the vectorstore
30
 
 
112
  # Get response from the LLM
113
  try:
114
  response = client.chat.completions.create(
115
+ model='accounts/fireworks/models/mixtral-8x7b-instruct',
116
  messages=prompt,
117
  temperature=0
118
  )