Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -142,7 +142,7 @@ def call_claude_api(prompt: str) -> str:
|
|
| 142 |
# conversation = client_claude.completions.create(
|
| 143 |
# prompt=f"{HUMAN_PROMPT} {prompt}{AI_PROMPT}",
|
| 144 |
# model="claude-3-5-sonnet-20241022",
|
| 145 |
-
#
|
| 146 |
# temperature=0.7,
|
| 147 |
# )
|
| 148 |
# return conversation.completion.strip()
|
|
@@ -154,7 +154,7 @@ def call_claude_api(prompt: str) -> str:
|
|
| 154 |
{"role": "system", "content": "You are a helpful assistant."},
|
| 155 |
{"role": "user", "content": prompt},
|
| 156 |
],
|
| 157 |
-
|
| 158 |
temperature=0.7,
|
| 159 |
)
|
| 160 |
return response["completion"].strip()
|
|
|
|
| 142 |
# conversation = client_claude.completions.create(
|
| 143 |
# prompt=f"{HUMAN_PROMPT} {prompt}{AI_PROMPT}",
|
| 144 |
# model="claude-3-5-sonnet-20241022",
|
| 145 |
+
# max_tokens=1024,
|
| 146 |
# temperature=0.7,
|
| 147 |
# )
|
| 148 |
# return conversation.completion.strip()
|
|
|
|
| 154 |
{"role": "system", "content": "You are a helpful assistant."},
|
| 155 |
{"role": "user", "content": prompt},
|
| 156 |
],
|
| 157 |
+
max_tokens=1024,
|
| 158 |
temperature=0.7,
|
| 159 |
)
|
| 160 |
return response["completion"].strip()
|