Commit graph

18 commits

Author SHA1 Message Date
Max
17c18e7d56 Refactor Neo API assistant to enhance vision support and message handling
- Updated the Assistant struct to include a vision capability flag and an init hook indicator, allowing for better management of vision-enabled functionalities.
- Refactored message handling throughout the assistant methods to utilize the chatMessage package, improving consistency and type safety.
- Enhanced the handleVision method to support dynamic vision processing options, including improved handling of image descriptions and uploads.
- Streamlined the requestMessages and withAttachments methods to better accommodate vision capabilities, ensuring proper integration with image handling.
- Improved the initialize method to check for vision support based on the model, enhancing the assistant's adaptability.

These changes improve the robustness and maintainability of the Neo API, paving the way for enhanced assistant functionalities and better integration of vision capabilities.
2025-01-17 15:16:26 +08:00
Max
e7185aad10 Enhance Neo API assistant with function support and improved message handling
- Introduced a new Function type to define assistant functions, enhancing the assistant's capabilities.
- Updated the Assistant struct to include a Functions field, allowing for dynamic function management.
- Refactored the streamChat method to handle tool calls, improving interaction with functions during chat streaming.
- Enhanced message handling in the NewOpenAI function to support tool call responses, ensuring proper message parsing.
- Implemented loading and saving of functions from a JSON file, streamlining function management within the assistant.

These changes improve the robustness and maintainability of the Neo API, paving the way for more flexible and powerful assistant functionalities.
2025-01-15 11:20:55 +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
13a343a7f4 Remove unused utils import and clean up ImagesGenerations function 2024-11-07 17:03:58 +08:00
Max
953d592669 feat: Integrate AIGC & OpenAI with Moapi service 2024-07-30 16:59:13 +08:00
Max
0a9c0167dd [add] chat.completions ( dev ) 2023-11-12 04:11:56 +08:00
Max
c19d4b0534 [add] moapi process and api 2023-11-10 01:37:09 +08:00
Max
4530aeab2f Improve neo error messages 2023-05-15 19:59:35 +08:00
Max
1d102f110b [add] openai process 2023-05-12 22:11:31 +08:00
Max
538c6c063a [add] openai.* process 2023-05-12 21:47:18 +08:00
Max
7ee7de96c9 [add] Neo (70%) 2023-04-30 14:21:45 +08:00
Max
60ef6c1e5c [add] neo (50%) 2023-04-29 16:48:37 +08:00
Max
894c574db4 [add] aigc widget done 2023-04-27 22:31:51 +08:00
Max
7e480633d4 [add] openai api done 2023-04-27 12:20:47 +08:00
Max
4ee38de7e7 [fix] tests 2023-04-26 19:39:15 +08:00
Max
4e37119714 [_] 2023-04-26 19:23:38 +08:00
Max
52a15bab2f [add] open ai api 2023-04-26 19:16:59 +08:00
Max
2a36edf891 [add] openai processes 2023-04-09 18:41:04 +08:00