Commit Graph

537 Commits

Author SHA1 Message Date
Maries 569e68ac62 refactor: update model provider to use ModelFactory for instance mana… (#223)
* refactor: update model provider to use ModelFactory for instance management

* refactor: integrate ModelFactory for model instance mapping in tests

* refactor: remove unused imports and clean up test files
2025-10-20 14:27:20 +08:00
Chieh Wang e2f6d0452a feat: support ja (#195) 2025-09-26 22:51:43 +08:00
He Wang 5f69350b7c fix: use dict.get() to avoid KeyError when transforming llm response (#209) 2025-09-26 13:17:32 +08:00
Rick b96f493563 feat: add max_invocation_timeout parameter (#208)
* feat: add max_invocation_timeout parameter

* style: format MAX_INVOCATION_TIMEOUT description for better readability

---------

Co-authored-by: Bytechoreographer <bytechoreographer@gmail.com>
2025-09-26 13:14:02 +08:00
Harry 64d1f8fdde refactor: update type hints and improve error handling in datasource examples 2025-09-24 14:48:36 +08:00
Harry 4821ef2552 feat: add datasource plugin examples 2025-09-24 14:34:21 +08:00
Maries 2a5d34cd8f Merge pull request #149 from langgenius/feat/datasource
feat[0.5.0]: datasource
2025-09-24 11:33:48 +08:00
ZalterCitty 9f4ec08d62 support invoke tool with app_id (#207) 2025-09-18 14:43:52 +08:00
Harry 04b6a5f36b chore: bump version to 0.5.0 2025-09-18 13:07:59 +08:00
Harry fe397eaa9f Merge remote-tracking branch 'origin/main' into feat/datasource 2025-09-18 13:06:53 +08:00
immortal-wm 2fc9753673 fix: corrected latency accuracy (#189)
* fix latency calc

* feat: add timing context management to AIModel for latency tracking

- Introduced a new TimingContextRaceConditionError to handle race conditions in multi-threaded environments.
- Implemented a timing_context method in AIModel to track request timing and prevent concurrent usage.
- Updated various model classes (LargeLanguageModel, ModerationModel, RerankModel, Speech2TextModel, TextEmbeddingModel, TTSModel) to utilize the new timing context for latency calculations.
- Added tests to validate timing context behavior under concurrent and sequential usage scenarios.

* feat: implement ModelFactory for dynamic model instance creation

- Added ModelFactory class to generate stateless model instances based on provider configurations and model classes.
- Updated PluginRegistration to utilize ModelFactory for managing model instances, enhancing code organization and maintainability.

* feat: add unit tests for model registry and mock model provider

- Introduced a new test file for validating model registry functionality.
- Implemented mock classes for model provider and LLM to facilitate testing.
- Added tests to ensure correct model instance retrieval from the registry.

* apply ruff

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-09-16 16:15:20 +08:00
Yeuoly d53cea4093 Merge branch 'main' into feat/datasource 2025-09-09 16:50:29 +08:00
Yeuoly 5687c6f969 bump to 0.4.5 (#204) 2025-09-08 23:32:48 +08:00
QuantumGhost 005d05bc36 feat(python): relaxing version verification (#202)
Relaxing the verification for `PluginConfiguration.version`
and `PluginConfiguration.Meta.minimum_dify_version`.

SDK part of langgenius/dify#25160
2025-09-08 15:25:00 +08:00
deniswen 6b1d99fb62 fix: resolve 100% CPU usage in stdio buffer by replacing O(n²) Byte concatenation with BytesIO (#201)
* fix: improve stream reading and buffering logic

* fix: Re-add accidentally deleted line

---------

Co-authored-by: deniswen <denis.wen@anker-in.com>
2025-09-08 15:23:41 +08:00
Novice 71da9e6ca6 chore: bump version to 0.5.0b15 2025-09-02 22:00:37 +08:00
Novice fbb6346f69 feat: add rag tag (#200) 2025-09-02 21:58:09 +08:00
Yeuoly 19da13ec06 Update pyproject.toml (#199) 2025-08-29 17:50:46 +08:00
Novice a554614833 feat: add developer message (#192) 2025-08-29 17:40:43 +08:00
-LAN- 582381a673 feat: add filename support to multi-modal prompt messages (#197)
* feat: add filename support to multi-modal prompt messages

- Add filename field to MultiModalPromptMessageContent class
- Field defaults to empty string for backward compatibility
- Inherited by all multi-modal content types (Image, Video, Audio, Document)
- Aligns with main Dify repository implementation (PR #24777)

Closes #196

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(README.md): update version binding

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

---------

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-29 17:33:28 +08:00
Harry a9f514d169 feat: update datasource output_schema 2025-08-25 18:57:07 +08:00
Harry 5e2e2844ab : update datasource output_schema 2025-08-25 18:56:23 +08:00
Harry aab8a0383e chore: bump version to 0.5.0b14 2025-08-11 15:37:00 +08:00
Harry 7477bb18de refactor: update datasource field type and clean up output schemas in Google Cloud Storage examples 2025-08-11 15:36:27 +08:00
Harry 84dc259157 chore: bump version to 0.5.0b13 2025-08-08 15:34:57 +08:00
Harry 654336032a refactor: remove unused builtin definitions and schema resolver utilities 2025-08-08 15:34:38 +08:00
Harry 1d42d79a03 chore: bump version to 0.5.0b12 2025-08-08 14:23:39 +08:00
Harry 1c3a3d1db3 refactor: remove output schema resolution logic from datasource and tool manifest loading 2025-08-08 14:23:22 +08:00
Harry bacfb3ea6e refactor: remove redundant 'dify_builtin_type' properties from schema definitions 2025-08-08 11:03:46 +08:00
Harry e96e7716b7 refactor: clean up whitespace and formatting in schema-related files 2025-08-07 17:28:04 +08:00
Harry cc28036c9a chore: bump to 0.5.0b11 2025-08-07 17:21:50 +08:00
Harry 9f37b75887 feat: implement built-in schema definitions and schema resolution utilities 2025-08-07 17:18:05 +08:00
Harry 400ad358af chore: bump version to 0.5.0b10 2025-08-06 18:04:58 +08:00
Harry 22b7df0e6c feat: enhance datasource manifest with new structure chunks and schema resolution 2025-08-06 18:03:49 +08:00
Tianyi Jing 99a0bd3f5a fix: type for ProviderConfig.default (#186) 2025-08-01 17:33:30 +08:00
Harry 685a14077b feat: built-in json schema 2025-08-01 15:08:47 +08:00
Harry 963c901290 fix: linter 2025-07-31 23:04:34 +08:00
Harry 002fb26057 chore: bump to 0.5.0b9 2025-07-31 23:02:28 +08:00
Harry e126c70b01 chore: apply ruff 2025-07-31 22:59:45 +08:00
Harry d7e109f760 feat: built-in json schema 2025-07-31 22:58:57 +08:00
Harry f3aa56fa04 feat: update notion datasource 2025-07-31 21:52:24 +08:00
Harry 4c0c0f2d3b feat: add online drive plugin example 2025-07-31 21:51:47 +08:00
Harry 530f83697d feat: datasource 2025-07-30 11:30:09 +08:00
Harry 8c0a630fdd chore: apply ruff 2025-07-29 22:06:33 +08:00
Harry 01deb74621 feat: add OAuth credential refresh functionality and update Notion datasource 2025-07-29 22:04:59 +08:00
Harry 8d552ae069 feat: examples 2025-07-29 18:48:16 +08:00
Harry 56db20fc40 Merge branch 'main' into feat/datasource
# Conflicts:
#	python/dify_plugin/core/plugin_executor.py
#	python/dify_plugin/core/runtime.py
#	python/dify_plugin/entities/__init__.py
#	python/dify_plugin/entities/agent.py
#	python/dify_plugin/entities/tool.py
#	python/dify_plugin/errors/tool.py
#	python/dify_plugin/integration/run.py
#	python/dify_plugin/interfaces/tool/__init__.py
#	python/dify_plugin/plugin.py
#	python/examples/github/manifest.yaml
#	python/examples/github/provider/github.py
#	python/examples/github/provider/github.yaml
#	python/examples/github/requirements.txt
#	python/examples/github/tools/github_repositories.py
#	python/examples/github/tools/github_repository_readme.py
#	python/pyproject.toml
2025-07-29 18:44:38 +08:00
Yeuoly 00ec765694 chore: bump to 0.4.3 2025-07-24 17:35:26 +08:00
Yeuoly 2448e826a8 fix(tool): temporarily alias LogMetadata to CommonLogMetadata to prevent import errors before version 0.5.0 (#182)
* fix(tool): temporarily alias LogMetadata to CommonLogMetadata to prevent import errors before version 0.5.0

* apply ruff
2025-07-24 17:32:14 +08:00
Maries c6f83a63e1 feat[0.4.2]: Tool OAuth (#179)
* chore: fix ruff issue

* feat(oauth): implement OAuth

* feat(invoke-message): refactor message handling and introduce InvokeMessage class

* feat(plugin-oauth): add credential_id and credential_type to tool parameters

* feat(plugin-oauth): add credential_id and credential_type to tool parameters

* chore: update dify_plugin version to 0.5.0b4 and clean up github.yaml

* chore: update plugin version to 0.1.2 in manifest.yaml

* feat(session): session context and tool backwards invocation credential support

* feat(oauth): session context and tool backwards invocation credential support

* feat: update README and requirements for OAuth support in version 0.4.2

* feat: add .gitignore to exclude IDE files and secret keys

* chore: apply ruff

* feat: bump version to 0.4.2b1

* feat: update GitHub plugin configuration for OAuth support and improve credential handling

* feat: update .gitignore to exclude dify plugin files and public keys

* feat: fix credential validation for GitHub API and bump version to 0.2.1

* feat: update GitHub plugin to support multiple access tokens and bump version to 0.2.5

* chore: apply ruff

* feat: add ToolProviderOAuthError for improved OAuth error handling in GitHub plugin

* chore: apply ruff

* chore: bump version to 0.4.2

* chore: update examples sdk version to 0.4.2

* fix: thread deadlock in PluginRunner when running tests without gevent monkey patching

* feat: add support for refreshing OAuth credentials in Plugin and GitHub provider

* feat: refactor OAuth credential handling to return structured OAuthCredentials object

* apply ruff

* feat: refactor OAuth credential handling to use ToolOAuthCredentials for improved structure

* feat: reorganize imports in __init__.py for improved clarity and structure

* feat: add Microsoft To Do plugin for refresh token example

* chore: apply ruff

* fix: update author in GitHub configuration and clean up Microsoft To Do schema

* chore: bump version to 0.4.2b2 in pyproject.toml

* feat: update Microsoft To Do plugin to handle OAuth token encoding and version bump

* feat:remove inelegant example

* chore: update dify_plugin version to 0.4.2

* chore: bump version to 0.4.2 in pyproject.toml

---------

Co-authored-by: Yeuoly <admin@srmxy.cn>
2025-07-23 13:49:01 +08:00