Spaces:
Sleeping
Sleeping
Commit
·
cd547e2
1
Parent(s):
f73c6b1
Initial commit
Browse files
app.py
CHANGED
|
@@ -28,7 +28,7 @@ try:
|
|
| 28 |
)
|
| 29 |
# تست API Key
|
| 30 |
test_response = client.chat.completions.create(
|
| 31 |
-
model="
|
| 32 |
messages=[{"role": "user", "content": "test"}],
|
| 33 |
max_tokens=10,
|
| 34 |
extra_headers={
|
|
@@ -110,7 +110,7 @@ def generate_code(user_input, language):
|
|
| 110 |
logger.info(f"Generated prompt: {prompt}")
|
| 111 |
|
| 112 |
response = client.chat.completions.create(
|
| 113 |
-
model="
|
| 114 |
messages=[
|
| 115 |
{"role": "system", "content": f"You are a coding assistant that generates complete and well-explained code in {language}. Always provide clean, working code with comments in Persian when needed."},
|
| 116 |
{"role": "user", "content": prompt}
|
|
|
|
| 28 |
)
|
| 29 |
# تست API Key
|
| 30 |
test_response = client.chat.completions.create(
|
| 31 |
+
model="openai/gpt-oss-20b:free",
|
| 32 |
messages=[{"role": "user", "content": "test"}],
|
| 33 |
max_tokens=10,
|
| 34 |
extra_headers={
|
|
|
|
| 110 |
logger.info(f"Generated prompt: {prompt}")
|
| 111 |
|
| 112 |
response = client.chat.completions.create(
|
| 113 |
+
model="openai/gpt-oss-20b:free",
|
| 114 |
messages=[
|
| 115 |
{"role": "system", "content": f"You are a coding assistant that generates complete and well-explained code in {language}. Always provide clean, working code with comments in Persian when needed."},
|
| 116 |
{"role": "user", "content": prompt}
|