Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,13 @@ def generate_response(prompt, history, model, temperature, max_tokens, top_p, se
|
|
10 |
|
11 |
if seed == 0:
|
12 |
seed = random.randint(1, 100000)
|
|
|
|
|
13 |
|
14 |
stream = client.chat.completions.create(
|
15 |
messages=[
|
16 |
{"role": "system", "content": "you are a helpful assistant."},
|
17 |
-
{"role": "user", "content":
|
18 |
],
|
19 |
model=model,
|
20 |
temperature=temperature,
|
|
|
10 |
|
11 |
if seed == 0:
|
12 |
seed = random.randint(1, 100000)
|
13 |
+
|
14 |
+
input_text = prompt + history
|
15 |
|
16 |
stream = client.chat.completions.create(
|
17 |
messages=[
|
18 |
{"role": "system", "content": "you are a helpful assistant."},
|
19 |
+
{"role": "user", "content": input_text}
|
20 |
],
|
21 |
model=model,
|
22 |
temperature=temperature,
|