自然进化

1.优化记忆清除机制;
2.优化prompt。
This commit is contained in:
guo zebin
2025-11-12 22:29:08 +08:00
parent da05cd73e6
commit 7567fd4248
9 changed files with 149 additions and 76 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import requests
import json
def test_gpt(prompt):
url = 'http://127.0.0.1:8000/v1/chat/completions' # 替换为您的接口地址
url = 'http://127.0.0.1:5000/v1/chat/completions' # 替换为您的接口地址
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer YOUR_API_KEY', # 如果您的接口需要身份验证
@@ -46,7 +46,7 @@ def test_gpt(prompt):
print(f"\n收到未知格式的数据:{line}")
if __name__ == "__main__":
user_input = "7"
user_input = "你好"
print("GPT 的回复:")
test_gpt(user_input)
print("\n请求完成")