Commit graph

1906 commits

Author SHA1 Message Date
Max
7f9307dbdd Add chat deletion functionality across conversation implementations
- Implemented DeleteChat and DeleteAllChats methods in Mongo, Redis, Weaviate, and Xun conversation handlers to allow users to delete specific chats and all chats associated with their account.
- Updated the Conversation interface in types.go to include the new deletion methods, ensuring consistent API across different storage backends.
- Added unit tests for DeleteChat and DeleteAllChats methods in xun_test.go to verify functionality and ensure proper deletion of chat histories.
- Enhanced error handling in deletion methods to provide robust feedback during chat removal operations.
2024-12-17 10:27:44 +08:00
Max
9db67a2456 Refactor chat retrieval in Neo API to support filtering and pagination
- Updated GetChats method across conversation implementations to accept a ChatFilter struct, enabling keyword filtering, pagination, and ordering.
- Enhanced handleChatList method in the Neo API to construct a filter from query parameters, improving the flexibility of chat retrieval.
- Introduced new types (ChatFilter, ChatGroup, ChatGroupResponse) to facilitate structured responses and better organization of chat data.
- Improved error handling and response structure for chat retrieval, ensuring robust feedback and clarity in API responses.
2024-12-17 10:18:37 +08:00
Max
f666070bb3 Add user field support in conversation settings and enhance user ID retrieval in Xun
- Introduced a new UserField in the Setting struct to allow customization of the user ID field name.
- Implemented getUserID method in Xun to retrieve user IDs based on the configured UserField, improving flexibility in user identification.
- Updated multiple methods (UpdateChatTitle, GetChats, GetHistory, SaveHistory, GetRequest, SaveRequest, GetChat) to utilize the new user ID retrieval logic, ensuring consistent handling of user sessions.
- Enhanced error handling for user ID retrieval, ensuring robust feedback in case of issues.
2024-12-17 09:54:57 +08:00
Max
b3bc843235 Enhance chat update functionality and introduce chat title generation in Neo API
- Updated handleChatUpdate method to include content field in the request body, allowing for dynamic chat title generation based on user input.
- Implemented GenerateChatTitle method to create a concise title for chats, improving user experience and interaction.
- Modified JSON response structure in handleChatDetail and handleChatUpdate methods for better clarity and consistency.
- Enhanced error handling for chat updates, ensuring robust validation and feedback for users.
2024-12-16 19:59:23 +08:00
Max
869ed3717a Add chat update functionality and enhance API endpoints in Neo API
- Introduced a new endpoint for updating chat details, allowing users to modify chat titles via the handleChatUpdate method.
- Implemented error handling for missing session IDs and chat IDs, ensuring robust validation of input parameters.
- Enhanced existing API structure by adding status, chat list, chat detail, history, file upload, download, and mentions endpoints, improving overall API usability.
- Improved code organization and maintainability by clearly defining new methods for handling chat updates and related functionalities.
2024-12-16 17:46:17 +08:00
Max
eadc550980 Add chat detail and mentions handling in Neo API
- Introduced new endpoints for retrieving chat details and mentions, enhancing the API's functionality.
- Implemented handleChatDetail method to fetch details of a specific chat by ID, including error handling for missing parameters.
- Added handleMentions method to retrieve mentions based on keywords, improving user interaction with chat content.
- Updated existing GetChats method to support keyword filtering, allowing for more refined chat list retrieval.
- Enhanced the DSL structure to include new methods for managing mentions and chat details, improving overall code organization and maintainability.
2024-12-16 17:36:02 +08:00
Max
2da7c30ac5 Refactor query handling in Xun conversation management
- Introduced a NewQuery method to streamline query creation, enhancing code readability and maintainability.
- Updated multiple methods (UpdateChatTitle, GetChats, GetHistory, SaveHistory, GetRequest, SaveRequest, clean) to utilize the new query method, reducing redundancy in query table references.
- Improved overall structure of the conversation management code by centralizing query logic.
2024-12-16 12:37:11 +08:00
Max
b34f97ac2a Add file download functionality to Neo API
- Introduced a new endpoint for downloading files, enhancing the API's capabilities.
- Implemented the handleDownload method to manage download requests, including validation for required parameters (sid and file_id).
- Updated the Download method in the assistant interface to retrieve files based on file_id, ensuring proper error handling and response structure.
- Enhanced file upload logic to include file extensions in generated IDs for better file management.
- Added necessary response headers for file downloads, improving user experience during file retrieval.
2024-12-16 11:07:22 +08:00
Max
3fbcd4a5e1 Add support for JSON file type in AllowedFileTypes across assistant modules 2024-12-15 09:54:18 +08:00
Max
773e050925 Implement file upload functionality in Neo API, adding new endpoint for file uploads and enhancing assistant management. Introduce handleUpload method to process file uploads, including size and type validation. Update context to include upload information and refactor assistant selection logic for improved clarity. Enhance error handling and response structure for file upload operations, ensuring robust communication of success and failure states. 2024-12-14 19:39:14 +08:00
Max
c98a402e54 Refactor Neo API chat handling to improve AI interaction and error management. Introduce background processing for chat with AI, enhancing responsiveness and client handling. Update assistant initialization logic to streamline the creation of OpenAI assistants and ensure proper error handling. Modify message struct to support structured error responses, improving clarity in communication. Additionally, clean up unused code and enhance overall maintainability of the assistant management system. 2024-12-14 17:45:40 +08:00
Max
c8643bbe45 Refactor HookCreate and assistant management in Neo API to improve response handling and streamline assistant creation. Update HookCreate to return structured CreateResponse with AssistantID and ChatID, enhancing error handling. Modify Load function to create the default assistant after querying the assistant list, ensuring proper initialization. Refactor newAssistant methods for better clarity and maintainability, and update types to include CreateResponse struct for improved response management. 2024-12-14 14:53:01 +08:00
Max
6c244d8788 Refactor Neo API to enhance CORS handling and streamline endpoint registration. Introduce OPTIONS handlers for all endpoints, improve CORS middleware logic, and reorganize assistant creation flow in load.go. Additionally, add a delay in the Answer method to ensure proper retrieval of assistant and chat IDs. 2024-12-14 13:03:05 +08:00
Max
79ee5b75f9 Refactor error handling in Neo API to streamline message creation. Replace map-based error responses with a more concise error method in the message struct, enhancing readability and maintainability. Update related functions to ensure consistent error messaging across chat handling and response writing. 2024-12-13 19:49:54 +08:00
Max
2ebc29d6f7 Enhance Neo API and conversation management by adding support for server-sent events (SSE) in chat handling, improving error messaging with structured responses, and refactoring assistant creation logic. Update conversation settings to utilize a new assistant model and implement context management improvements for better performance. Additionally, streamline the DSL structure and enhance test coverage for chat functionalities. 2024-12-13 17:51:13 +08:00
Max
1c078a5d2e Refactor Neo DSL tests and API structure by removing unused handlers, enhancing conversation management, and implementing new test cases for prompts, chat messages, and history saving. Introduce custom response recorder for improved testing and mock AI for simulating responses. 2024-12-13 11:17:00 +08:00
Max
cd01149db1 Update dependencies in go.mod and go.sum; upgrade golang.org/x/crypto to v0.31.0, golang.org/x/text to v0.21.0, golang.org/x/sync to v0.10.0, and golang.org/x/sys to v0.28.0. Modify process initialization in cmd/run.go to use context for improved execution management. 2024-12-13 01:02:22 +08:00
Max
de7f5fc9b1 Enhance NewContext function to include ChatID parameter for improved context management 2024-12-12 20:21:02 +08:00
Max
153efc1a49 Refactor command handling and conversation management by removing the command package, updating conversation methods to support chat IDs, and enhancing API functionality for chat history and titles. This includes adjustments to the DSL context and conversation settings for improved data handling. 2024-12-12 16:37:59 +08:00
Max
319faff110 Remove outdated issue templates and update contact links in config.yml 2024-12-09 09:40:30 +08:00
Max
001d23756f Improve README.md to clarify app creation methods and emphasize programming capabilities 2024-12-04 18:21:47 +08:00
Max
f05c1d3bf8 Revise README.md to enhance clarity and provide a concise overview of Yao's features and capabilities 2024-12-04 18:17:20 +08:00
Max
401fd3aa94 Fix code signing command and update .gitignore to exclude shell scripts 2024-12-04 11:38:52 +08:00
Max
7ddacd70f9 Update Go version in macOS build workflow to 1.23.4 2024-12-04 09:47:30 +08:00
Max
8bd097274c Update macOS build workflow 2024-12-03 19:02:21 +08:00
Max
03d98d9a5a Enhance macOS build workflow with code signing verification and submission to Apple Notary Service 2024-12-03 18:55:59 +08:00
Max
a420e71118 Translate error messages in login process to English for improved clarity 2024-12-03 16:55:33 +08:00
Max
68a97a48e6 Update URL handling in request data to use mapped URL 2024-12-03 16:21:52 +08:00
Max
d4f5a434a8 Improve error message for missing app.yao file for better clarity 2024-12-03 16:10:59 +08:00
Max
e1af3a8a27 Translate captcha and password validation error messages to English for improved clarity 2024-12-02 19:15:44 +08:00
Max
2c5b323d7d Add option to disable Gzip compression for static files and update headers 2024-11-30 18:23:21 +08:00
Max
1d414bceb8 Fix endpoint URL formatting to handle default port correctly 2024-11-29 20:50:24 +08:00
Max
6b6edab97c Refactor network handling and endpoint retrieval; deprecate unused commands in startup 2024-11-29 20:43:29 +08:00
Max
8388b78a0e Update community link text in welcome message for clarity 2024-11-29 19:47:12 +08:00
Max
d9475988ff Add community link to welcome message and adjust documentation spacing 2024-11-29 19:45:42 +08:00
Max
c6cdf1115a Enhance startup output by adding runtime, data, and listening information; update frontend and dashboard labels to website and admin 2024-11-29 17:58:29 +08:00
Max
95dc351fa0 Deprecate Yao Studio functionality and comment out related code 2024-11-29 17:43:38 +08:00
Max
d7693a0487 Refactor startup logic to improve directory checks and enhance welcome message display 2024-11-29 17:36:45 +08:00
Max
79f77618d3 Remove setup package and related functionality from the project 2024-11-29 16:44:31 +08:00
Max
83fc43cc52 Enable Docker Content Trust for all build jobs in workflow files 2024-11-29 15:27:03 +08:00
Max
c78e169fbc Enable Docker Content Trust in build workflows 2024-11-29 15:09:16 +08:00
Max
5bf6044cf0 Update Dockerfiles to use Ubuntu 24.04 and change download source for Yao binary 2024-11-29 14:38:41 +08:00
Max
dc43e9ca4f Update build-linux.yml and Dockerfile for environment improvements and AWS CLI installation 2024-11-29 13:37:06 +08:00
Max
d176ef904d Update build-linux.yml to use ubuntu-latest instead of ubuntu-22.04 2024-11-29 12:26:45 +08:00
Max
b10fe0ac38 Refactor build-linux.yml to replace Coscmd with AWS CLI for R2 configuration and upload 2024-11-29 12:24:18 +08:00
Max
d15bd28cec Update build-linux.yml to include apt-get update before installing dependencies 2024-11-29 11:53:31 +08:00
Max
35911de0ea Enhance SEO metadata handling by adding keywords support and fixing og:title attribute syntax 2024-11-29 11:12:37 +08:00
Max
73ccac6ba5 Update dependencies in go.mod and go.sum for uuid, tiktoken-go, and regexp2 2024-11-26 15:34:54 +08:00
Max
e6acbacc6b Add unzip installation to Dockerfile for build dependencies 2024-11-23 19:01:10 +08:00
Max
f3b3e80ccf Add unzip step for libv8 in CI workflows and build script 2024-11-23 18:09:21 +08:00