-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plugin) add ai-history plugin #1224
Conversation
@yuemingming 这个记得处理下 |
Done |
@yuemingming 加一下我钉钉:chengtanzty |
可能还需要考虑下如何兼容OpenAI的多模态的协议 curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What'\''s in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
],
"max_tokens": 300
}' 请求里content字段是数组 可以参考下 #1221 里的处理 或者后续我这边完善下这块也可以 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1224 +/- ##
==========================================
+ Coverage 35.91% 44.34% +8.43%
==========================================
Files 69 75 +6
Lines 11576 9821 -1755
==========================================
+ Hits 4157 4355 +198
+ Misses 7104 5139 -1965
- Partials 315 327 +12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
实现 ai-history 插件,支持自动填充历史对话,以及查询历史对话。
Ⅱ. Does this pull request fix one issue?
fixes #1193
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews