debug
Browse files
data/models/llama3-1-8b.py
CHANGED
|
@@ -25,10 +25,10 @@ pipeline = transformers.pipeline(
|
|
| 25 |
def chat_completion():
|
| 26 |
data = request.json
|
| 27 |
|
| 28 |
-
user_input = data
|
| 29 |
-
max_tokens = data
|
| 30 |
-
temperature = data
|
| 31 |
-
top_p = data
|
| 32 |
|
| 33 |
try:
|
| 34 |
outputs = pipeline(
|
|
|
|
| 25 |
def chat_completion():
|
| 26 |
data = request.json
|
| 27 |
|
| 28 |
+
user_input = data.get('messages', [])
|
| 29 |
+
max_tokens = data.get('max_tokens', 2048)
|
| 30 |
+
temperature = data.get('temperature', 0.7)
|
| 31 |
+
top_p = data.get('top_p', 0.95)
|
| 32 |
|
| 33 |
try:
|
| 34 |
outputs = pipeline(
|