Commit graph

17 commits

Author SHA1 Message Date
Max
ad311cad2a Add audio transcription file handling and related tests
- Introduce `AudioTranscriptionsFile` method in the OpenAI package to transcribe audio directly from a file path, improving memory efficiency.
- Implement new test cases for `AudioTranscriptionsFile`, including scenarios for language options and error handling for non-existent files.
- Update the process package to support the new transcription method, ensuring compatibility with existing functionality.
- Enhance test coverage for audio transcription processes, validating expected outputs and error conditions.
2026-02-10 19:05:29 +08:00
Max
a278c4c63a Update OpenAI test and API configuration
- Replace deprecated model "text-davinci-003" with "gpt-3_5-turbo-instruct"
- Comment out deprecated Edits method in tests and implementation
- Enhance HTTP request headers with explicit Content-Type
- Add fallback for model configuration when not explicitly set
- Improve header handling for Azure and standard OpenAI authentication
2025-02-08 15:59:46 +08:00
Max
a7a05fbec8 Add Azure OpenAI support and improve message parsing
- Implement Azure OpenAI authentication with `azure` flag in OpenAI struct
- Update HTTP request headers to support Azure API key authentication
- Enhance message parsing to handle additional edge cases in OpenAI responses
- Add debug logging for OpenAI messages when debug environment is set
- Improve error and usage detection in stream message processing
2025-02-08 11:18:06 +08:00
Max
9c0ab4e0e1 Configure base URL for OpenAI API initialization
- Added default base URL "/v1" in NewMoapi method
- Supports flexible base URL configuration for OpenAI API client
- Complements previous work on API configuration and streaming improvements
2025-02-06 09:19:10 +08:00
Max
96f4b5e55a Add support for reasoning content and thinking state in OpenAI streaming
- Implemented handling of reasoning_content in OpenAI message parsing
- Added support for tracking thinking state with `<think>` tags
- Updated message generation to handle delta messages and thinking states
- Modified OpenAI API to support flexible base URL configuration
- Enhanced token scanning and message processing for reasoning content
2025-02-05 16:55:09 +08:00
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
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
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
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