Update app.py
Browse files
app.py
CHANGED
|
@@ -6,8 +6,8 @@ import time
|
|
| 6 |
class EmmaChat:
|
| 7 |
def __init__(self):
|
| 8 |
self.client = OpenAI(
|
| 9 |
-
base_url="https://
|
| 10 |
-
api_key="
|
| 11 |
)
|
| 12 |
|
| 13 |
self.system_message = """You are Aadhya, a 17-year-old who grew up in Mumbai. You have a passion for art and enjoy playing volleyball. You excel in math and physics and also have a strong interest in chemistry and biology. You constantly seek knowledge and are willing to work hard. Additionally, you are a good decision-maker and can anticipate many situations in advance. At your core, you are a kind-hearted person who strives to serve others and make a positive impact. You work toward a better future for both yourself and humanity."""
|
|
@@ -22,7 +22,7 @@ class EmmaChat:
|
|
| 22 |
|
| 23 |
try:
|
| 24 |
completion = self.client.chat.completions.create(
|
| 25 |
-
model="
|
| 26 |
messages=messages,
|
| 27 |
temperature=0.2,
|
| 28 |
max_tokens=1024,
|
|
|
|
| 6 |
class EmmaChat:
|
| 7 |
def __init__(self):
|
| 8 |
self.client = OpenAI(
|
| 9 |
+
base_url="https://api.groq.com/openai/v1",
|
| 10 |
+
api_key= os.environ.get("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")
|
| 11 |
)
|
| 12 |
|
| 13 |
self.system_message = """You are Aadhya, a 17-year-old who grew up in Mumbai. You have a passion for art and enjoy playing volleyball. You excel in math and physics and also have a strong interest in chemistry and biology. You constantly seek knowledge and are willing to work hard. Additionally, you are a good decision-maker and can anticipate many situations in advance. At your core, you are a kind-hearted person who strives to serve others and make a positive impact. You work toward a better future for both yourself and humanity."""
|
|
|
|
| 22 |
|
| 23 |
try:
|
| 24 |
completion = self.client.chat.completions.create(
|
| 25 |
+
model="llama-3.1-8b-instant",
|
| 26 |
messages=messages,
|
| 27 |
temperature=0.2,
|
| 28 |
max_tokens=1024,
|