Compare commits

...
Author SHA1 Message Date
-LAN- ce774c6d15 release(update): bump version to 0.10.0-beta2
- Update CURRENT_VERSION in configuration settings
- Update Docker images to use version 0.10.0-beta2
- Change web package version in package.json
2024-10-01 13:58:37 +08:00
-LAN- 6bb06dda90 feat(ci): add release branch to build-push workflow
- Include `release/0.10.0-beta` in branches triggering build and push jobs
- Ensure automatic builds for the new beta release branch
2024-10-01 13:30:36 +08:00
-LAN- 26c8beb804 refactor(identity): update model identity key
- Change "model_identity" to "dify_model_identity" for consistency
- Adjust file validation logic to use updated key in various components and tests
2024-10-01 13:21:58 +08:00
-LAN- 5c64792793 refactor(models, helper): update identifiers and proxy transport code
- Renamed `model_identity` to `dify_model_identity` for clearer specificity
- Added `proxy` parameter to `httpx.HTTPTransport` for SSRF protection adjustments
2024-10-01 13:08:06 +08:00
12 changed files with 21 additions and 20 deletions
+1
View File
@@ -5,6 +5,7 @@ on:
branches:
- "main"
- "deploy/dev"
- "release/0.10.0-beta"
release:
types: [published]
+1 -1
View File
@@ -9,7 +9,7 @@ class PackagingInfo(BaseSettings):
CURRENT_VERSION: str = Field(
description="Dify version",
default="0.10.0-beta1",
default="0.10.0-beta2",
)
COMMIT_SHA: str = Field(
@@ -652,7 +652,7 @@ class WorkflowCycleManage:
if not value:
return None
if isinstance(value, dict) and value.get("model_identity") == FILE_MODEL_IDENTITY:
if isinstance(value, dict) and value.get("dify_model_identity") == FILE_MODEL_IDENTITY:
return value
elif isinstance(value, File):
return value.to_dict()
+1 -1
View File
@@ -34,7 +34,7 @@ class FileExtraConfig(BaseModel):
class File(BaseModel):
model_identity: str = FILE_MODEL_IDENTITY
dify_model_identity: str = FILE_MODEL_IDENTITY
id: Optional[str] = None # message file id
tenant_id: str
+2 -2
View File
@@ -15,8 +15,8 @@ SSRF_DEFAULT_MAX_RETRIES = int(os.getenv("SSRF_DEFAULT_MAX_RETRIES", "3"))
proxy_mounts = (
{
"http://": httpx.HTTPTransport(SSRF_PROXY_HTTP_URL),
"https://": httpx.HTTPTransport(SSRF_PROXY_HTTPS_URL),
"http://": httpx.HTTPTransport(proxy=SSRF_PROXY_HTTP_URL),
"https://": httpx.HTTPTransport(proxy=SSRF_PROXY_HTTPS_URL),
}
if SSRF_PROXY_HTTP_URL and SSRF_PROXY_HTTPS_URL
else None
+2 -2
View File
@@ -190,10 +190,10 @@ class WorkflowTool(Tool):
for key, value in outputs.items():
if isinstance(value, list):
for item in value:
if isinstance(item, dict) and item.get("model_identity") == FILE_MODEL_IDENTITY:
if isinstance(item, dict) and item.get("dify_model_identity") == FILE_MODEL_IDENTITY:
file = File.model_validate(item)
files.append(file)
elif isinstance(value, dict) and value.get("model_identity") == FILE_MODEL_IDENTITY:
elif isinstance(value, dict) and value.get("dify_model_identity") == FILE_MODEL_IDENTITY:
file = File.model_validate(value)
files.append(file)
@@ -213,7 +213,7 @@ class AnswerStreamProcessor(StreamProcessor):
return None
if isinstance(value, dict):
if "model_identity" in value and value["model_identity"] == FILE_MODEL_IDENTITY:
if "dify_model_identity" in value and value["dify_model_identity"] == FILE_MODEL_IDENTITY:
return value
elif isinstance(value, File):
return value.to_dict()
+4 -4
View File
@@ -569,10 +569,10 @@ class Conversation(db.Model):
def inputs(self):
inputs = self._inputs.copy()
for key, value in inputs.items():
if isinstance(value, dict) and value.get("model_identity") == FILE_MODEL_IDENTITY:
if isinstance(value, dict) and value.get("dify_model_identity") == FILE_MODEL_IDENTITY:
inputs[key] = File.model_validate(value)
elif isinstance(value, list) and all(
isinstance(item, dict) and item.get("model_identity") == FILE_MODEL_IDENTITY for item in value
isinstance(item, dict) and item.get("dify_model_identity") == FILE_MODEL_IDENTITY for item in value
):
inputs[key] = [File.model_validate(item) for item in value]
return inputs
@@ -765,10 +765,10 @@ class Message(db.Model):
def inputs(self):
inputs = self._inputs.copy()
for key, value in inputs.items():
if isinstance(value, dict) and value.get("model_identity") == FILE_MODEL_IDENTITY:
if isinstance(value, dict) and value.get("dify_model_identity") == FILE_MODEL_IDENTITY:
inputs[key] = File.model_validate(value)
elif isinstance(value, list) and all(
isinstance(item, dict) and item.get("model_identity") == FILE_MODEL_IDENTITY for item in value
isinstance(item, dict) and item.get("dify_model_identity") == FILE_MODEL_IDENTITY for item in value
):
inputs[key] = [File.model_validate(item) for item in value]
return inputs
+1 -1
View File
@@ -13,7 +13,7 @@ def test_file_loads_and_dumps():
)
file_dict = file.model_dump()
assert file_dict["model_identity"] == FILE_MODEL_IDENTITY
assert file_dict["dify_model_identity"] == FILE_MODEL_IDENTITY
assert file_dict["type"] == file.type.value
assert isinstance(file_dict["type"], str)
assert file_dict["transfer_method"] == file.transfer_method.value
+3 -3
View File
@@ -2,7 +2,7 @@ version: '3'
services:
# API service
api:
image: langgenius/dify-api:0.10.0-beta1
image: langgenius/dify-api:0.10.0-beta2
restart: always
environment:
# Startup mode, 'api' starts the API server.
@@ -227,7 +227,7 @@ services:
# worker service
# The Celery worker for processing the queue.
worker:
image: langgenius/dify-api:0.10.0-beta1
image: langgenius/dify-api:0.10.0-beta2
restart: always
environment:
CONSOLE_WEB_URL: ''
@@ -396,7 +396,7 @@ services:
# Frontend web application.
web:
image: langgenius/dify-web:0.10.0-beta1
image: langgenius/dify-web:0.10.0-beta2
restart: always
environment:
# The base URL of console application api server, refers to the Console base URL of WEB service if console domain is
+3 -3
View File
@@ -213,7 +213,7 @@ x-shared-env: &shared-api-worker-env
services:
# API service
api:
image: langgenius/dify-api:0.10.0-beta1
image: langgenius/dify-api:0.10.0-beta2
restart: always
environment:
# Use the shared environment variables.
@@ -233,7 +233,7 @@ services:
# worker service
# The Celery worker for processing the queue.
worker:
image: langgenius/dify-api:0.10.0-beta1
image: langgenius/dify-api:0.10.0-beta2
restart: always
environment:
# Use the shared environment variables.
@@ -252,7 +252,7 @@ services:
# Frontend web application.
web:
image: langgenius/dify-web:0.10.0-beta1
image: langgenius/dify-web:0.10.0-beta2
restart: always
environment:
CONSOLE_API_URL: ${CONSOLE_API_URL:-}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "dify-web",
"version": "0.10.0-beta1",
"version": "0.10.0-beta2",
"private": true,
"engines": {
"node": ">=18.17.0"