Skip to content
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

extend ai-prompt-decorator plugin with client's geographic message from geo-ip plugin #1228

Merged
merged 10 commits into from
Aug 20, 2024

Conversation

ranxuxin001
Copy link
Contributor

@ranxuxin001 ranxuxin001 commented Aug 19, 2024

Ⅰ. Describe what this PR did
这个pr扩展了ai-prompt-decorator插件,把geo-ip插件根据用户ip计算出的地理位置信息传递到ai-prompt-decorator插件里。该插件把用户地理信息和用户提问组合到messages数组里,一起发送给上游llvm 大模型服务。返回的回答参考了用户的地理位置信息,能够赋予更本地化,更精确的回答。

Ⅱ. Does this pull request fix one issue?

fixes #1223


# 基于geo-ip 插件的能力,扩展AI 提示词装饰器插件携带用户地理位置信息
配置示例如下:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

备注下需要同时开启geo-ip插件才能使用

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.96%. Comparing base (ef31e09) to head (e9d91b6).
Report is 48 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1228      +/-   ##
==========================================
+ Coverage   35.91%   35.96%   +0.05%     
==========================================
  Files          69       69              
  Lines       11576     9500    -2076     
==========================================
- Hits         4157     3417     -740     
+ Misses       7104     5767    -1337     
- Partials      315      316       +1     

see 67 files with indirect coverage changes

@johnlanni johnlanni merged commit 4307f88 into alibaba:main Aug 20, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Based on the geo-ip plugin, extend the capabilities of the ai-promopt-decorator plugin.
3 participants