Commit Graph

23 Commits

Author SHA1 Message Date
Yeuoly 6d6fb3892e feat: add InvokeLLMWithStructuredOutput functionality (#369)
* feat: add InvokeLLMWithStructuredOutput functionality

- Introduced a new method InvokeLLMWithStructuredOutput to the BackwardsInvocation interface for handling structured output requests.
- Added corresponding request and response types to support structured output.
- Implemented the method in both RealBackwardsInvocation and MockedDifyInvocation for testing purposes.
- Updated permission handling and task execution for the new structured output invocation type.

This enhancement allows for more flexible and detailed responses from the LLM, improving the overall functionality of the invocation system.

* refactor: enhance LLMResultChunkWithStructuredOutput structure

- Updated the LLMResultChunkWithStructuredOutput type to include additional fields: Model, SystemFingerprint, and Delta.
- Added comments to clarify the reasoning behind the structure and the use of type embedding for JSON marshaling.

This change improves the clarity and functionality of the LLMResultChunkWithStructuredOutput type, ensuring proper JSON serialization.

* refactor: streamline LLMResultChunk construction in InvokeLLMWithStructuredOutput

- Simplified the construction of LLMResultChunk and LLMResultChunkWithStructuredOutput by removing unnecessary type embedding.
- Enhanced readability and maintainability of the code while preserving functionality.

This change contributes to cleaner code and improved clarity in the handling of structured output responses.
2025-06-30 12:07:46 +08:00
Yeuoly 1e260eedf4 refactor: using length-prefixed chunking for Backwards invocations (#342)
- Adjusted the header byte manipulation in chunking functions to correctly use the first four bytes for data length.
- Modified the HTTP request streaming function to include the length-prefixed option for improved data handling.
2025-06-11 16:01:53 +08:00
Good Wood 977665e73b feat: add read & write timeout config (#259)
* feat: add read & write timeout config

* refactor: update Dify invocation configuration to use structured payload

- Changed the Dify invocation daemon to accept a structured payload for initialization, improving clarity and maintainability.
- Updated related configuration variables in the .env.example file to reflect the new naming convention for backwards invocation timeouts.
- Adjusted tests and plugin manager to accommodate the new payload structure.

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-05-06 13:08:02 +08:00
Yeuoly 7c0db82d8c feat(invocation): add FetchApp method to backwards invocations (#213)
- Introduced FetchApp method in BackwardsInvocation interface to retrieve application data.
- Implemented FetchAppRequest type for request payload with required AppId field.
- Updated RealBackwardsInvocation to handle FetchApp requests and return application data.
- Added mock implementation for FetchApp in the testing suite.
- Enhanced task handling in plugin daemon to support FetchApp invocation.
2025-04-16 18:13:06 +08:00
Yeuoly 15060ee312 refactor: move entities to pkg 2025-01-06 14:52:02 +08:00
Yeuoly a1bbaf109b fix: replace break with continue when handling streaming response 2024-12-14 00:19:56 +08:00
Yeuoly 548adf4c0c refactor: rename agent to agent strategy 2024-12-12 18:26:55 +08:00
Yeuoly 407fb941ca feat: support for pprof 2024-12-04 14:15:16 +08:00
Yeuoly 80c8077f49 fix: failed on pointer type validation 2024-11-18 18:09:15 +08:00
Yeuoly 5c6f5f2ecd fix: skip validation on map 2024-11-18 17:46:12 +08:00
Yeuoly 6230ce4f7f feat: support request uploading files 2024-11-14 18:33:38 +08:00
Yeuoly 26fd94ebcd refactor: convert snakecase to camelcase 2024-11-12 21:24:41 +08:00
Yeuoly a55f6f507f refactor: install plugin from local 2024-10-18 20:29:02 +08:00
Yeuoly 9f561c63e3 feat: backwards invoke summary 2024-10-17 19:46:51 +08:00
Yeuoly fd82d23584 fix: ci 2024-09-30 19:42:35 +08:00
Yeuoly 3307c82af3 fix: clear endpoint credentials cache 2024-09-27 17:56:19 +08:00
Yeuoly fc0f567bbc fix: tests 2024-09-26 17:50:58 +08:00
Yeuoly 9cc4a5bef2 fix: tts 2024-09-26 17:40:43 +08:00
Yeuoly 5306940fa2 fix: missing error message while invoke to dify 2024-09-26 17:23:17 +08:00
Yeuoly dd67f65a04 fix: using validators to validate a map 2024-09-26 14:48:53 +08:00
Yeuoly b69398ce4b feat: backwards invoke to nodes 2024-09-24 20:15:46 +08:00
Yeuoly 755f3f1bb5 feat: support inner key 2024-09-20 13:32:46 +08:00
Yeuoly fefd3ef53e feat: support cli testing 2024-09-18 17:04:40 +08:00