Commit Graph

176 Commits

Author SHA1 Message Date
Novice e2447622a8 feat(model): add structured output feature to model 2025-04-15 14:00:27 +08:00
QuantumGhost 5cb24625c3 ci(python): Add CI Pipeline for Python SDK (#72)
* chore(python): temporarily disable `UP007` rule in Ruff

Disable the `UP007` rule temporarily due to numerous existing
violations in the current codebase.

* ci(python): add lint and test for Python SDK

* ci: Add mega-linter

* chore(python): Add final newline to markdown files

* fix(python): Fix linter issues by using ruff's auto fix

* fix(python): Fix TRY400 linter violations

Ruff suggests using `logger.exception` to log when
logging an exception, instead of using `logging.error`.

The former logs the exception and the traceback
automatically.

ref: https://docs.astral.sh/ruff/rules/error-instead-of-exception/

* fix(python): fix ruff linter violations

* test(python): Add Test cases for LLM entities

Test the initialization of `LLMResult` and `LLMResultChunk`.

* test(python): Add test for `AgentModelConfig`

Ensures that the `history_prompt_messages` attribute is
not shared between instances of `AgentModelConfig`.

* chore(python): output diffs in Ruff's format check

* style(python): format code with Ruff

* chore(python): Add a bash script for fix and format python code

* chore: add `persist-credentials: false` to checkout action

Enhances security by preventing subsequent
steps from accessing GitHub credentials, reducing
potential attack surfaces.

Ref: https://github.com/actions/checkout#checkout-v4
2025-04-14 20:25:19 +08:00
Yeuoly 12ad9db9b5 enhancement: remove prompt_messages from LLMResult and LLMResultChunk (#88)
* refactor: remove prompt_messages from LLMResult and LLMResultChunk

* fix: add backward compatibility for deprecated prompt_messages field in LLMResult and LLMResultChunk

* fix: set default value for prompt_messages field to an empty list in LLMResult and LLMResultChunk for backward compatibility

* feat: add test for LLMResult to validate prompt_messages field and ensure backward compatibility

* apply ruff
2025-04-11 15:23:05 +08:00
Vitor 6860f207c2 fix: ensure string fields in ToolCall default to empty string during initialization if set to explicit None (#82) 2025-04-10 14:45:39 +08:00
Junyan Qin (Chin) 0216ed8187 feat: add supports for provider to register array[tool] type field (#78) 2025-04-07 16:14:36 +08:00
-LAN- b3dac93c99 fix(entities/model/message): prompt message cannot validate when pass multi type contents (#73) 2025-03-28 10:58:42 +09:00
Novice 72d3e1ad03 Merge branch 'main' into feat/agent-memory 2025-03-26 13:20:06 +08:00
QuantumGhost bf79e6591d feat(python): Enable pycodestyle (W) warning ruleset with ruff (#69)
Refactor codebase to fix pre-existing style issues flagged by the ruleset.
2025-03-24 19:21:00 +08:00
Novice 193c061333 feat: add history message feature 2025-03-24 09:20:08 +08:00
-LAN- 967084177f fix: Update prompt message content types to use Literal and add union type for content (#49)
Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-03-17 17:28:21 +08:00
-LAN- b7a30ae78a fix: cannot init prompt message (#42)
* chore(*): Add pytest into test group

Signed-off-by: -LAN- <laipz8200@outlook.com>

* fix: Enhance content transformation to support Sequence type and add unit tests

Signed-off-by: -LAN- <laipz8200@outlook.com>

---------

Signed-off-by: -LAN- <laipz8200@outlook.com>
2025-03-14 13:36:48 +08:00
Novice Lee afc8397bc3 feat: add metadata to log 2025-02-07 10:53:20 +08:00
非法操作 85f7fa302d label display error when use_template (#14) 2025-01-14 18:01:44 +08:00
非法操作 f9df7e9577 sync MultiModalPromptMessageContent (#13) 2025-01-14 17:58:42 +08:00
Novice Lee fb24978387 feat: add agent node log 2025-01-09 08:51:43 +08:00
Novice 43e58b93e7 Merge pull request #7 from langgenius/feat/agent-node
feat: add agent strategy support
2025-01-08 07:50:49 +08:00
Novice Lee 92558f5c07 feat: add agent strategy support 2025-01-08 07:48:27 +08:00
Yeuoly 92cf93cdae fix some bugs 2025-01-03 17:30:02 +08:00
Yeuoly fa458ab0d9 fix: get attribute dose not exists in BlobMessage 2025-01-03 14:47:49 +08:00
Yeuoly bc4e9a05aa fix: variable message 2024-12-27 22:57:38 +08:00
Yeuoly 3e7565f075 feat: support percision to agent strategy parameter 2024-12-27 18:03:58 +08:00
Yeuoly 82438a99a2 feat: support parameter auto generate 2024-12-26 17:28:42 +08:00
Yeuoly d450c94888 fix: using absolute importing 2024-12-17 18:24:31 +08:00
Yeuoly f408642b27 fix: missing output schema 2024-12-17 18:14:40 +08:00
Yeuoly 74c8f073c9 feat: add label to agent log 2024-12-15 18:15:01 +08:00
Yeuoly 95dbdb2c4f feat: support hidden 2024-12-13 22:53:50 +08:00
Yeuoly 4ae9b45006 feat: support dify tool selector 2024-12-13 22:49:51 +08:00
Yeuoly 269627916c optimize agent 2024-12-13 15:08:12 +08:00
Yeuoly ba023e3470 feat: support agent log 2024-12-13 00:07:52 +08:00
Yeuoly c93028221c refactor: support agent 2024-12-12 19:15:00 +08:00
Yeuoly a623638d01 refactor: rename agent to agent strategy 2024-12-12 18:26:34 +08:00
Yeuoly 15c14aedf8 feat: agent plugin 2024-12-09 22:01:41 +08:00
Yeuoly 9e0f50b230 feat: support TOP_K as default parameter 2024-12-05 20:55:53 +08:00
-LAN- 42980322a0 feat: support convert in the PromptMessage.transform_content
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-04 15:09:37 +08:00
-LAN- c2a56f8c85 feat(entities): Add VideoPromptMessageContent and AudioPromptMessageContent
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-04 13:03:15 +08:00
Yeuoly 435c0da60e refactor: use absolute paths 2024-12-03 15:19:19 +08:00
-LAN- b4b0c29169 refactor: prevent raise-without-from-inside-except
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 22:18:56 +08:00
-LAN- da41fbf0ab refactor: suppressible-exception
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 22:13:06 +08:00
-LAN- 6358a80025 chore: prevent collapsible-if
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:59:13 +08:00
-LAN- 105606e34b refactor: Remove un-needed bool
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:53:23 +08:00
-LAN- 4551f79ca3 chore: Fix lines-too-long
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:27:12 +08:00
-LAN- b3e0612e53 chore: Apply format
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:18:36 +08:00
-LAN- 37128aeadd chore: Apply unsafe auto-fixes and check manually
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:17:21 +08:00
-LAN- 5858fe715e chore: Apply formet and auto fix
Signed-off-by: -LAN- <laipz8200@outlook.com>
2024-12-02 21:10:36 +08:00
Yeuoly ad6ca50b38 feat: summarize, fix: missing files 2024-12-02 16:00:34 +08:00
Yeuoly 347cb0c5f0 fix: add ParameterType text 2024-11-29 20:23:48 +08:00
Yeuoly 5bcbae8b80 fix: add json schema 2024-11-29 20:19:57 +08:00
Yeuoly 07a02f67d6 fix: field validator should be wrappered with classmethod 2024-11-29 20:14:12 +08:00
Yeuoly 4afefe26e4 fix: add prompt_message transformer 2024-11-29 20:06:48 +08:00
Yeuoly 9f6754dd31 fix: openai api compatible get_num_tokens and document prompt message content 2024-11-29 20:00:03 +08:00