Commit Graph

49 Commits

Author SHA1 Message Date
wizardchen 160672ea9c feat: enhance message structure to support multi-content messages
- Introduced MessageContentPart and ImageURL types to allow for multi-content messages that can include both text and images.
- Updated the Message struct to include a MultiContent field for handling multiple message parts.
- Modified the ConvertMessages function to prioritize processing of multi-content messages, improving the handling of user messages with images.

These changes enhance the flexibility and functionality of chat messages, enabling richer content delivery.
2026-03-16 17:33:50 +08:00
wizardchen 6a7eb420a9 refactor: update conversation handling and image description requirements
- Removed outdated instructions regarding the `skip_kb_search` field in the conversation configuration.
- Clarified requirements for `image_description` to ensure it is non-empty when images are present.
- Adjusted the handling of message parts in the chat pipeline to improve image processing.
- Deleted unused migration files related to image handling in the database schema.

These changes enhance the clarity and functionality of the conversation and image processing logic.
2026-03-16 15:15:24 +08:00
wizardchen 5fe1ccd4f9 feat: enhance multimodal support and image handling
- Updated configuration to improve handling of multimodal queries, including clearer guidelines for when to use [NO_SEARCH] in responses.
- Enhanced the user interface to include dedicated sections for multimodal configuration, allowing users to manage image uploads and related settings more effectively.
- Added localization support for new multimodal features in both English and Chinese, improving accessibility for a broader audience.
- Implemented backend changes to support image analysis and extraction of OCR text, enriching the interaction experience for users.

These enhancements significantly improve the application's capability to process and respond to multimodal queries, fostering a more interactive and user-friendly environment.
2026-03-16 02:26:47 +08:00
wizardchen 991bd29a14 feat: implement image upload and multimodal support
- Added functionality for image uploads in chat, allowing users to attach images for multimodal Q&A.
- Enhanced the input field to handle image selection via drag-and-drop and paste, with validation for file types and sizes.
- Updated the backend to process images alongside text queries, including support for image analysis.
- Introduced new UI components for image previews and management, improving user interaction with uploaded content.
- Added localization strings for image upload features and error messages, enhancing accessibility for users in multiple languages.

These changes significantly improve the chat experience by enabling users to incorporate images into their queries, facilitating richer interactions and responses.
2026-03-16 02:26:47 +08:00
ChenRussell 0fe5d67b6a fix: enforce 7500 char limit in chunker to prevent embedding API errors
Prevents 400 Bad Request errors when uploading documents with large
tables or code blocks by adding hard limits in buildUnitsWithProtection
and mergeUnits functions.
2026-03-15 23:59:34 +08:00
Manx98 447fac4b54 fix: NVIDIA VLM model API default BaseURL 2026-03-13 18:14:08 +08:00
Manx98 a355ac889e feat: NVIDIA chat model API support custom endpoint 2026-03-13 18:14:08 +08:00
Manx98 5afc81d00b feat: support NVIDIA model API 2026-03-13 18:14:08 +08:00
wizardchen a4b255a456 feat: implement final_answer tool and enhance agent duration tracking
- Introduced the final_answer tool to ensure agents submit their complete responses as the last action, improving response accuracy and consistency.
- Updated the agent engine to log detailed information about tool calls and responses, including the total duration of agent execution.
- Enhanced the chat message model to include agent_duration_ms, tracking the total execution time from query start to answer delivery.
- Implemented JSON field extraction for streaming responses, allowing for more efficient handling of tool call outputs.

These changes significantly improve the agent's response handling and ensure that final answers are consistently delivered, enhancing overall user experience.
2026-03-09 11:46:56 +08:00
wizardchen 397689d2f3 feat: introduce WeKnora Lite edition with lightweight configuration and deployment
- Added a new `.env.lite.example` file for the Lite version, providing a minimal configuration template.
- Updated `.env.example` to remove deprecated variables and include new Docreader settings.
- Enhanced Docker configurations to support the Lite version, including a new Dockerfile for the Docreader service.
- Introduced a Makefile target for building and running the Lite version, along with packaging capabilities.
- Created GitHub workflows for building and releasing Lite binaries, including Homebrew formula support.
- Implemented a new service file for managing the Lite version as a system service.

This update enables a streamlined, single-binary deployment of WeKnora, reducing external dependencies and simplifying setup.
2026-03-02 21:21:49 +08:00
xiaoen b536e86cd0 fix: handle thinking content in Ollama chat responses
Ollama API returns reasoning model output in Message.Thinking field,
but OllamaChat only reads Message.Content. Add thinking content
handling for both streaming and non-streaming, consistent with
RemoteAPIChat behavior.
2026-02-25 11:11:24 +08:00
MEKXH c2cdc16712 fix(chat): strip thinking content from model output
Handle thinking models that return wrapped content even when
Thinking=false is configured. This is a fallback strategy for models
like MiniMax-M2.1 that do not fully support the Thinking parameter.
The thinking tags and their enclosed content are completely stripped.
2026-02-04 19:35:55 +08:00
begoniezhao 4610a4d1ee feat: Use num_ctx instead of truncate for embedding truncation 2026-02-04 14:24:01 +08:00
MEKXH 467ac01384 fix(zhipu): correct Embedding BaseURL to match API structure
Remove '/embeddings' suffix from ZhipuEmbeddingBaseURL to align with
Chat and Rerank BaseURL patterns. The OpenAIEmbedder automatically
appends '/embeddings' to the baseURL, so including it in the constant
would result in duplicate '/embeddings/embeddings' in the final URL.
2026-01-25 16:53:49 +08:00
wizardchen aa4af5365e feat: add thinking mode support for agents 2026-01-20 18:19:44 +08:00
joeyczheng b1633c836a fix: concurrent map writes due to dig.Container is not thread safe
Signed-off-by: joeyczheng <joeyczheng@tencent.com>
2026-01-15 20:07:11 +08:00
nullkey 7947305ff0 fix: 增加魔搭社区嵌入模型所需的EncodingFormat参数 2026-01-09 11:08:57 +08:00
nullkey 579b57d377 feat:add several mainstream model providers 2026-01-09 11:08:57 +08:00
nullkey 1d10d0395a feat:add model provider GPUStack 2026-01-09 11:08:57 +08:00
wizardchen 884153aeb8 feat: 增强模型选择和错误处理机制
优化模型ID传递逻辑,支持请求级别的模型覆盖;完善流式响应的错误处理
2025-12-31 15:36:20 +08:00
hylaz 9e51f85e55 feat:修改小米模型域名 2025-12-30 18:13:08 +08:00
begoniezhao 907e9a5522 feat: Add DataSchema tool for retrieving schema information from CSV and Excel files 2025-12-29 20:03:51 +08:00
JAESOL SHIN ddf5ae4e65 fix(chat): exclude ChatTemplateKwargs for OpenAI API
ChatTemplateKwargs parameter is only supported by custom backends
like vLLM. OpenAI API does not support this parameter and returns
400 Bad Request error.

This change conditionally includes ChatTemplateKwargs only when
the provider is ProviderGeneric (custom deployment).

Fixes connection test failure for OpenAI models with error:
"Unrecognized request argument supplied: chat_template_kwargs"
2025-12-29 19:08:15 +08:00
wizardchen c9a6c3134a Merge branch 'custom_agent' 2025-12-29 17:01:23 +08:00
nullkey e9a2a7b3e5 feat: 新增对多家平台的模型适配 2025-12-29 12:18:42 +08:00
wizardchen 6bc19ab082 feat: 统一系统提示词并优化智能体选择器界面
- 将系统提示词从分离的网络搜索开/关状态合并为统一提示词,使用 {{web_search_status}} 占位符动态控制行为
- 重构智能体选择器,从简单tooltip升级为内容丰富的popup,显示智能体详细信息、类型和能力
- 新增FAQ优先策略配置,支持FAQ答案优先于普通文档
- 优化知识库选择逻辑,智能体切换时自动同步配置的知识库
- 更新相关接口类型定义和国际化文本
2025-12-28 21:46:42 +08:00
wizardchen d0c5c4f6b0 feat: 新增智能体功能模块,支持自定义智能体创建、配置和选择 2025-12-24 10:34:41 +08:00
wizardchen eb8bfddfd1 refactor: Update function signatures across multiple files to improve readability by adding context parameters and enhancing code structure 2025-11-28 16:17:52 +08:00
wizardchen 135e33eca4 refactor: Clean up code by removing unnecessary blank lines and improving comments for better readability and maintainability 2025-11-28 16:10:37 +08:00
wizardchen b5890b3169 refactor: Enhance knowledge base and agent features in documentation 2025-11-26 11:27:48 +08:00
wizardchen bf35a2861c refactor: Sanitize log inputs to prevent injection attacks 2025-11-25 22:19:41 +08:00
wizardchen 2f45bf7d86 refactor: Improve Elasticsearch query construction and error handling 2025-11-25 22:06:43 +08:00
wizardchen 64c44c9e27 refactor: Update tenant ID handling across the application 2025-11-25 16:30:54 +08:00
wizardchen 057cfd9eb0 feat: Enhance FAQ import functionality and UI improvements
- Added support for tracking the status of FAQ import tasks, including progress indicators for ongoing imports.
- Introduced new localization strings for processing tasks and batch operations in multiple languages.
- Updated the FAQ entry manager to display import progress and improved user feedback during the import process.
- Enhanced the KnowledgeBase component to reflect the processing state of knowledge items, improving user experience during document uploads.
- Implemented batch deletion functionality for chunks, streamlining the management of knowledge base content.
2025-11-23 17:32:50 +08:00
wizardchen 3bf2a14499 feat: Enhance agent configuration and localization for web search prompts
- Updated agent configuration to support separate system prompts for web search enabled and disabled states.
- Removed deprecated agent configuration parameters to streamline settings management.
- Enhanced UI components in AgentSettings.vue to allow configuration of custom prompts based on web search status.
- Improved localization in English, Russian, and Chinese for new prompt settings and UI elements.
- Refactored related API and service logic to accommodate changes in agent configuration structure.
2025-11-19 19:27:25 +08:00
wizardchen ae58801baf Merge remote-tracking branch 'github_public/main' 2025-11-13 14:28:41 +08:00
fuyaozong ef69e2aed5 将各个判断模型是否可用的逻辑和接口/api/v1/initialization/ollama/models/check的逻辑统一:对于没有指定版本的模型,默认添加":latest",避免误判导致反复调用pull模型接口 2025-11-13 10:29:47 +08:00
wizardchen 69f3f30d83 feat: Implement manual knowledge editing and enhance knowledge base features
- Added functionality for manual knowledge entry, allowing users to create and edit Markdown content directly in the browser.
- Introduced new API endpoints for creating and updating manual knowledge entries.
- Enhanced UI components to support the new manual knowledge editor, including integration with existing knowledge base features.
- Updated knowledge retrieval logic to accommodate manual entries, ensuring seamless user experience across knowledge types.
- Improved agent configuration to support custom system prompts, enhancing flexibility in agent responses.
2025-11-12 21:27:56 +08:00
wizardchen d387fd672f chore: Update .gitignore and Makefile for development enhancements
- Added 'logs/' and '*.pid' to .gitignore to exclude log files and process ID files from version control.
- Expanded Makefile with new development commands for easier local environment management, including 'dev-start', 'dev-stop', 'dev-restart', 'dev-logs', 'dev-status', 'dev-app', and 'dev-frontend'.
- Updated README_CN.md to include instructions for the new development mode and commands for improved developer experience.
2025-11-07 15:52:52 +08:00
wizardchen 4fa3adbf3b feat: Add agent configuration and cleanup scripts for database migrations 2025-11-05 23:18:44 +08:00
wizardchen 98e47e83d2 feat(ui): Support multi knowledgebases operation 2025-09-17 16:02:08 +08:00
wizardchen 91e65d6445 feat(ui): Support multi knowledgebases operation 2025-09-17 16:02:08 +08:00
wizardchen 2b6cbee1b6 feat: add aliyun rerank 2025-09-10 01:22:25 +08:00
wizardchen 4214e6782b feat: add aliyun rerank model 2025-09-10 01:22:25 +08:00
wizardchen 65b2d9eb84 feat: support aliyun qwen3 model 2025-09-08 15:10:25 +08:00
wizardchen 2e029731ed feat: Compatibility with rerank API output fields 2025-09-08 11:20:40 +08:00
Liwx1014 19c5e242bf 兼容解析重排序服务返回score字段 2025-08-28 16:27:59 +08:00
wizardchen bdabed6bfa feat: Added web page for configuring model information 2025-08-10 17:11:07 +08:00
wizardchen 56eb2bce33 init commit 2025-08-05 15:08:07 +08:00