fix(agent): show agent run steps, fixes #21718
parent
75f232d832
commit
e2533f1e6b
@ -0,0 +1,19 @@
|
|||||||
|
from typing import Optional, Any
|
||||||
|
from pydantic import BaseModel, Field, model_validator
|
||||||
|
from core.prompt.entities.role_prefix import RolePrefix
|
||||||
|
from core.prompt.entities.window import Window
|
||||||
|
|
||||||
|
class MemoryConfig(BaseModel):
|
||||||
|
role_prefix: RolePrefix = Field(default_factory=RolePrefix)
|
||||||
|
window: Window = Field(default_factory=Window)
|
||||||
|
memory_key: Optional[str] = Field(None)
|
||||||
|
|
||||||
|
# The `model_validate` method is used to create a `MemoryConfig` object from a dictionary.
|
||||||
|
@model_validator(mode="before")
|
||||||
|
@classmethod
|
||||||
|
def pre_validate(cls, values: Any) -> Any:
|
||||||
|
if "role_prefix" not in values:
|
||||||
|
values["role_prefix"] = {}
|
||||||
|
if "window" not in values:
|
||||||
|
values["window"] = {}
|
||||||
|
return values
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
\# For production release, change this to PRODUCTION
|
||||||
|
NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT
|
||||||
|
# The deployment edition, SELF_HOSTED
|
||||||
|
NEXT_PUBLIC_EDITION=SELF_HOSTED
|
||||||
|
# The base URL of console application, refers to the Console base URL of WEB service if console domain is
|
||||||
|
# different from api or web app domain.
|
||||||
|
# example: http://cloud.dify.ai/console/api
|
||||||
|
NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
|
||||||
|
# The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from
|
||||||
|
# console or api domain.
|
||||||
|
# example: http://udify.app/api
|
||||||
|
NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api
|
||||||
|
# The API PREFIX for MARKETPLACE
|
||||||
|
NEXT_PUBLIC_MARKETPLACE_API_PREFIX=https://marketplace.dify.ai/api/v1
|
||||||
|
# The URL for MARKETPLACE
|
||||||
|
NEXT_PUBLIC_MARKETPLACE_URL_PREFIX=https://marketplace.dify.ai
|
||||||
|
|
||||||
|
# SENTRY
|
||||||
|
NEXT_PUBLIC_SENTRY_DSN=
|
||||||
|
|
||||||
|
# Disable Next.js Telemetry (https://nextjs.org/telemetry)
|
||||||
|
NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
|
# Disable Upload Image as WebApp icon default is false
|
||||||
|
NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON=false
|
||||||
|
|
||||||
|
# The timeout for the text generation in millisecond
|
||||||
|
NEXT_PUBLIC_TEXT_GENERATION_TIMEOUT_MS=60000
|
||||||
|
|
||||||
|
# CSP https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
|
||||||
|
NEXT_PUBLIC_CSP_WHITELIST=
|
||||||
|
# Default is not allow to embed into iframe to prevent Clickjacking: https://owasp.org/www-community/attacks/Clickjacking
|
||||||
|
NEXT_PUBLIC_ALLOW_EMBED=
|
||||||
|
|
||||||
|
# Github Access Token, used for invoking Github API
|
||||||
|
NEXT_PUBLIC_GITHUB_ACCESS_TOKEN=
|
||||||
|
# The maximum number of top-k value for RAG.
|
||||||
|
NEXT_PUBLIC_TOP_K_MAX_VALUE=10
|
||||||
|
|
||||||
|
# The maximum number of tokens for segmentation
|
||||||
|
NEXT_PUBLIC_INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH=4000
|
||||||
|
|
||||||
|
# Maximum loop count in the workflow
|
||||||
|
NEXT_PUBLIC_LOOP_NODE_MAX_COUNT=100
|
||||||
|
|
||||||
|
# Maximum number of tools in the agent/workflow
|
||||||
|
NEXT_PUBLIC_MAX_TOOLS_NUM=10
|
||||||
|
|
||||||
|
# Maximum number of Parallelism branches in the workflow
|
||||||
|
NEXT_PUBLIC_MAX_PARALLEL_LIMIT=10
|
||||||
|
|
||||||
|
# The maximum number of iterations for agent setting
|
||||||
|
NEXT_PUBLIC_MAX_ITERATIONS_NUM=99
|
||||||
|
|
||||||
|
NEXT_PUBLIC_ENABLE_WEBSITE_JINAREADER=true
|
||||||
|
NEXT_PUBLIC_ENABLE_WEBSITE_FIRECRAWL=true
|
||||||
|
NEXT_PUBLIC_ENABLE_WEBSITE_WATERCRAWL=true
|
||||||
|
|
||||||
|
# The maximum number of tree node depth for workflow
|
||||||
|
NEXT_PUBLIC_MAX_TREE_DEPTH=50
|
||||||
Loading…
Reference in New Issue