ArvindSelvaraj commited on
Commit
8b55d5e
1 Parent(s): cbbeb85

Update backend.py

Browse files
Files changed (1) hide show
  1. backend.py +4 -4
backend.py CHANGED
@@ -4,12 +4,12 @@ import io
4
  import requests
5
  import html # For escaping HTML characters
6
  from bs4 import BeautifulSoup
7
- from openai import OpenAI
8
 
9
  # Initialize OpenAI API with Nvidia's Mistral model
10
  client = OpenAI(
11
- base_url="https://api.llama-api.com",
12
- api_key="LA-38879bbd57704371a151ce66b6186aa6e95ab69a3b974f5ca4459f2ce89c4de1"
13
  )
14
 
15
  def clean_test_case_output(text):
@@ -86,7 +86,7 @@ def generate_testcases(user_story):
86
  try:
87
  # Call the Nvidia Mistral API with the refined prompt
88
  completion = client.chat.completions.create(
89
- model="llama3.1-405b", # Using Mistral model
90
  messages=[
91
  {"role": "user", "content": prompt}
92
  ],
 
4
  import requests
5
  import html # For escaping HTML characters
6
  from bs4 import BeautifulSoup
7
+ from openai import OpenAI
8
 
9
  # Initialize OpenAI API with Nvidia's Mistral model
10
  client = OpenAI(
11
+ base_url="https://integrate.api.nvidia.com/v1",
12
+ api_key="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"
13
  )
14
 
15
  def clean_test_case_output(text):
 
86
  try:
87
  # Call the Nvidia Mistral API with the refined prompt
88
  completion = client.chat.completions.create(
89
+ model="nv-mistralai/mistral-nemo-12b-instruct", # Using Mistral model
90
  messages=[
91
  {"role": "user", "content": prompt}
92
  ],