xu song
commited on
Commit
•
7d0829c
1
Parent(s):
2b9d822
update
Browse files- models/cpp_qwen2.py +8 -8
models/cpp_qwen2.py
CHANGED
@@ -146,12 +146,12 @@ if __name__ == "__main__":
|
|
146 |
# output = bot.generate_response(messages)
|
147 |
# print(output)
|
148 |
|
149 |
-
|
150 |
-
print(
|
151 |
-
for generated_text,
|
152 |
-
print(generated_text,
|
153 |
-
|
154 |
-
|
155 |
-
print(
|
156 |
-
for generated_text, all_tokens in bot.generate_response(
|
157 |
print(generated_text, all_tokens)
|
|
|
146 |
# output = bot.generate_response(messages)
|
147 |
# print(output)
|
148 |
|
149 |
+
messages = [{"role": "system", "content": "你是一个导游。"}]
|
150 |
+
print(messages)
|
151 |
+
for generated_text, generated_tokens in bot.generate_query(messages, stream=True):
|
152 |
+
print(generated_text, generated_tokens)
|
153 |
+
|
154 |
+
messages.append({"role": "user", "content": generated_text, "tokens": generated_tokens})
|
155 |
+
print(messages)
|
156 |
+
for generated_text, all_tokens in bot.generate_response(messages, stream=True):
|
157 |
print(generated_text, all_tokens)
|