-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Feat: multipoint login #12203
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
base: main
Are you sure you want to change the base?
Feat: multipoint login #12203
Conversation
### What problem does this PR solve? ### Type of change - [x] Performance Improvement
### What problem does this PR solve? Add Kimi model series support. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
### What problem does this PR solve? Correct the logging message from "OpenAI cat_with_tools" to "OpenAI chat_with_tools" in the `_exceptions` method of the `Base` class to accurately reflect the method name and improve error traceability. ### Type of change - [x] Typo
fix: modify the connection ports of minio and redis in service_conf.yaml.template ### What problem does this PR solve? If you modify the external ports of minio and redis in the .env file, it will also affect the connection ports inside the container in the service_conf.yaml.template file, which is unreasonable. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
# Conflicts: # conf/llm_factories.json # graphrag/utils.py
- 新增 UserSession 模型支持多点登录会话数据存储 - 实现 UserSessionService 提供会话创建、查询、登出等功能 - 修改身份验证流程,优先从 UserSession 获取用户会话信息 - 用户登录时创建会话记录,返回对应的访问令牌 - 新增登出接口支持单会话或全部会话登出功能 - 增加获取用户活动会话列表接口 - 增加删除指定用户会话接口,支持会话管理 - 调整相关配置与依赖, Redis 端口调整为 6378 - 优化异步超时设置及 Redis 连接参数添加用户名支持 - 改进 Docker 启动脚本自动检测运行环境并调整配置路径
- Add UserSession data model to support multiple concurrent login sessions - Prioritize retrieving user data from UserSession in authentication flow - Implement rolling expiration mechanism based on last activity time with 30-day inactivity timeout - Refactor login logic to create UserSession records for maintaining multi-session state - Provide session logout, logout all sessions, and expired session cleanup functionality - Optimize exception handling to ensure backward compatibility and clear logging
|
Would you please update the Chinese comments to English ? @RobertWangWang |
…ging - Convert API comments from Chinese to English for better code internationalization and readability - Add logging for logout all sessions and single session operations to facilitate user activity tracking - Optimize session logout logic with clear distinction between logout all sessions and current session - Update API response descriptions to provide more accurate API documentation
I have updated the related python files. |
docker/entrypoint.sh
Outdated
| # Replace env variables in the service_conf.yaml file | ||
| # ----------------------------------------------------------------------------- | ||
| CONF_DIR="/ragflow/conf" | ||
| # 自动检测是否在Docker容器中或本地开发环境 |
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.
Would you please update the comments?
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.
Updated. Thank you
mcp/server/server.py
Outdated
| HOST = "" | ||
| PORT = "9382" | ||
| HOST_API_KEY = "" | ||
| HOST_API_KEY = "ragflow-RkM2VmNTc4NGI2YTExZjA5NjM3Y2VhZG" |
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.
Preset api key?
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.
Updated. Thank you
| env_file: .env | ||
| ports: | ||
| - ${REDIS_PORT}:6379 | ||
| - 6378:6379 |
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.
Why not use variable?
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.
I have deployed a local redis on the port 6379.For development reason I need to use 6378 for the ragflow redis to expose the port. You can keep the original seetings. Sorry for the confusion.
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.
These alteration is not necessary.
| { | ||
| context: ['/api/v1/admin'], | ||
| target: 'http://127.0.0.1:9381/', | ||
| target: 'http://127.0.0.1:9380/', |
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.
These alteration is not necessary.
| raise last_exc if last_exc else Exception("LLM chat failed without exception") | ||
|
|
||
| @timeout(20) | ||
| @timeout(20*60) |
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.
These alteration is not necessary.
| if password: | ||
| conn_params["password"] = password | ||
|
|
||
| conn_params["username"] = self.config.get("username", "default") |
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.
These alteration is not necessary.
|
|
||
| BASE_URL = "http://127.0.0.1:9380" | ||
| HOST = "127.0.0.1" | ||
| HOST = "" |
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.
These alteration is not necessary.
| @@ -0,0 +1,153 @@ | |||
| ragflow: | |||
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.
These alteration is not necessary.
| esac | ||
| done | ||
|
|
||
| # ----------------------------------------------------------------------------- |
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.
These alteration is not necessary.
| host: 'localhost' | ||
| port: 2881 | ||
| redis: | ||
| db: 1 |
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.
These alteration is not necessary.
| @@ -0,0 +1,152 @@ | |||
| ragflow: | |||
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.
These alteration is not necessary.
What problem does this PR solve?
refactor(auth): support multi-session login with user session management
Type of change