-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(jmanus): jmanus suppot memory #2047
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
Conversation
有点 对不齐 ,这个对应这个需求么? |
是的佬 |
@yuluo-yx 帮忙找个人review一下非 jmanus的代码 。 |
@ConfigurationProperties(H2ChatMemoryProperties.CONFIG_PREFIX) | ||
public class H2ChatMemoryProperties { | ||
|
||
public static final String CONFIG_PREFIX = "spring.ai.chat.memory.repository.jdbc.h2"; |
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.
Line 27 in 0390c9c
@ConfigurationProperties(prefix = "spring.ai.memory.elasticsearch") |
这里和其他 memory 保持一致吧
* Auto-configuration for h2 chat memory repository. | ||
*/ | ||
@AutoConfiguration(after = JdbcTemplateAutoConfiguration.class) | ||
@ConditionalOnClass({ H2ChatMemoryRepository.class, DataSource.class, JdbcTemplate.class }) |
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.
javax.sql.DataSource 需要这个 conditional 条件吗?
good job, thansk for your contribution. Please fix ci and some review comments before merging it. |
界面目前看已经很棒了 ! 不过,实测下来的问题:
java.lang.IllegalArgumentException: conversationId cannot be null or empty 这让我意识到,你的ConvId是在前端生产的
先改这几个吧。然后我再测测 |
好的佬 |
b605647
to
692e9de
Compare
Describe what this PR does / why we need it
使jmanus支持记忆能力



点击选择记忆按钮侧边展示记忆窗口
页面包含名称,修改名称按钮,展开记忆按钮,删除记忆按钮,记忆概览,记忆id,记忆条数,记忆时间
如未选择任何记忆(第一次交互也是如此),则会默认生成一条记忆。左侧列表会展示出来。
点击标题则选中记忆,此时选择记忆按钮会展示为选择的记忆id(包含清除记忆按钮),后续的对话会复用记忆并补充。同时侧边栏收起。也可以清除选择的记忆。选择不使用记忆来对话。
无论是否选择记忆,都可以通过点击选择记忆按钮来更换对话的记忆。
其他实现:
页面完全支持国际化。
记忆的默认名称是格式化的时间: 'MMM dd,yyyy hh:mm a' 。这里会根据不同时区展示不同的文字,如在中国会得到 '8月 07, 2025 09:30 上午' ,在美国会得到 'Aug 07, 2025 09:30 AM' 。
当侧边栏展开式,记忆列表会立即请求数据并保持每3秒刷新(当展开某一个记忆时,即使刷新数据也会保留展开状态,增强使用体验),当侧边栏收起时,则清除记忆列表的自动刷新。
同时增加了h2数据库的记忆组件。
对应issue:#1949
Does this pull request fix one issue?
Describe how you did it
Describe how to verify it
Special notes for reviews