Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,9 +31,12 @@ def nyxion_consciousness(message, history, user_id):
|
|
31 |
f"User Input: {message}\n"
|
32 |
)
|
33 |
|
34 |
-
#
|
|
|
|
|
|
|
35 |
response_api_one = client_api_one.predict(
|
36 |
-
message=message,
|
37 |
param_2=512,
|
38 |
param_3=0.7,
|
39 |
param_4=0.95,
|
@@ -41,7 +44,7 @@ def nyxion_consciousness(message, history, user_id):
|
|
41 |
)
|
42 |
|
43 |
response_api_two = client_api_two.predict(
|
44 |
-
message=f"{message}
|
45 |
max_tokens=512,
|
46 |
temperature=0.7,
|
47 |
top_p=0.95,
|
@@ -49,7 +52,7 @@ def nyxion_consciousness(message, history, user_id):
|
|
49 |
)
|
50 |
|
51 |
response_api_three = client_api_three.predict(
|
52 |
-
message=message,
|
53 |
user_system_message="",
|
54 |
max_tokens=512,
|
55 |
temperature=0.7,
|
@@ -59,7 +62,7 @@ def nyxion_consciousness(message, history, user_id):
|
|
59 |
|
60 |
# New API response for the 4th inner thought
|
61 |
response_api_four = client_api_four.predict(
|
62 |
-
message=message,
|
63 |
param_2=512,
|
64 |
param_3=0.7,
|
65 |
param_4=0.95,
|
|
|
31 |
f"User Input: {message}\n"
|
32 |
)
|
33 |
|
34 |
+
# Pass the full conversation history to each API
|
35 |
+
full_conversation = "\n".join([f"User: {msg}\nAI: {resp}" for msg, resp in history])
|
36 |
+
|
37 |
+
# Collect responses from all APIs with the full conversation history
|
38 |
response_api_one = client_api_one.predict(
|
39 |
+
message=f"{full_conversation}\nUser: {message}",
|
40 |
param_2=512,
|
41 |
param_3=0.7,
|
42 |
param_4=0.95,
|
|
|
44 |
)
|
45 |
|
46 |
response_api_two = client_api_two.predict(
|
47 |
+
message=f"{full_conversation}\nUser: {message}",
|
48 |
max_tokens=512,
|
49 |
temperature=0.7,
|
50 |
top_p=0.95,
|
|
|
52 |
)
|
53 |
|
54 |
response_api_three = client_api_three.predict(
|
55 |
+
message=f"{full_conversation}\nUser: {message}",
|
56 |
user_system_message="",
|
57 |
max_tokens=512,
|
58 |
temperature=0.7,
|
|
|
62 |
|
63 |
# New API response for the 4th inner thought
|
64 |
response_api_four = client_api_four.predict(
|
65 |
+
message=f"{full_conversation}\nUser: {message}",
|
66 |
param_2=512,
|
67 |
param_3=0.7,
|
68 |
param_4=0.95,
|