Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce774c6d15 | ||
|
|
6bb06dda90 | ||
|
|
26c8beb804 | ||
|
|
5c64792793 |
@@ -5,6 +5,7 @@ on:
|
||||
branches:
|
||||
- "main"
|
||||
- "deploy/dev"
|
||||
- "release/0.10.0-beta"
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dify-web",
|
||||
"version": "0.10.0-beta1",
|
||||
"version": "0.10.0-beta2",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": ">=18.17.0"
|
||||
|
||||
Reference in New Issue
Block a user