ArvindSelvaraj
commited on
Commit
•
8b55d5e
1
Parent(s):
cbbeb85
Update backend.py
Browse files- 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://
|
12 |
-
api_key="
|
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="
|
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 |
],
|