Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 39 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
AZURE_API_VERSION=xxxx
AZURE_API_BASE=xxxx
AZURE_API_KEY=xxx
# LITELLM_PROXY_API_BASE=xxx
# LITELLM_PROXY_API_KEY=xxxx
# DEEPSEEK_API_KEY=xxxx
# Azure
AZURE_API_VERSION=2024-12-01-preview
AZURE_API_BASE=https://your-azure-endpoint.openai.azure.com/
AZURE_API_KEY=your-azure-api-key

# Optional model provider keys
DEEPSEEK_API_KEY=
LITELLM_PROXY_API_BASE=http://litellm.example.com:4000
LITELLM_PROXY_API_KEY=your-litellm-proxy-key
GPT_KEY=your-gpt-key
OPENAI_API_KEY=your-openai-api-key

# Bohrium / Materials
BOHRIUM_USER_ID=your-bohrium-user-id
BOHRIUM_BASE_URL=https://openapi.test.dp.tech
BOHRIUM_ACCESS_KEY=your-bohrium-access-key
BOHRIUM_PROJECT_ID=your-bohrium-project-id
MATERIALS_ACCESS_KEY=your-materials-access-key
MATERIALS_PROJECT_ID=your-materials-project-id
MATERIALS_SKU_ID=your-materials-sku-id

# OPIK
OPIK_URL_OVERRIDE=https://your-opik-url/api
OPIK_WORKSPACE=default
OPIK_PROJECT_NAME=test
MATERIALS_ACCESS_KEY=xxxx
MATERIALS_PROJECT_ID=xxxx

OPENAI_API_KEY=sk-XX
GPT_CHAT_MODEL=gpt-5-chat
GPT_BASE_URL=xxx
# Default model
DEFAULT_MODEL=azure/gpt-5-chat
# DEFAULT_MODEL=deepseek/deepseek-chat
BOHRIUM_USE_SANDBOX=1

# RAG plan-make (used by rag/settings.yaml and rag/plan_llm.py)
PLAN_MAKE_MODEL=qwen3-vl-plus
PLAN_MAKE_API_KEY=your-plan-make-api-key
PLAN_MAKE_API_BASE=https://dashscope.aliyuncs.com/compatible-mode/v1

# OSS
OSS_ENABLED=true
OSS_BUCKET_NAME=your-oss-bucket
OSS_ACCESS_KEY_ID=your-oss-access-key-id
OSS_ACCESS_KEY_SECRET=your-oss-access-key-secret
OSS_ENDPOINT=https://oss-cn-zhangjiakou.aliyuncs.com
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
ToolConnectAgent,
)
from agents.matmaster_agent.flow_agents.model import PlanStepStatusEnum
from agents.matmaster_agent.flow_agents.tool_name_utils import (
normalize_tool_name_to_canonical,
)
from agents.matmaster_agent.llm_config import MatMasterLlmConfig
from agents.matmaster_agent.locales import i18n
from agents.matmaster_agent.logger import PrefixFilter
Expand Down Expand Up @@ -209,7 +212,11 @@ async def _run_events(self, ctx: InvocationContext) -> AsyncGenerator[Event, Non
if isinstance(tool_schema, str):
tool_schema = tool_schema.replace('{', '[').replace('}', ']')

tool_args_recommend_prompt = ALL_TOOLS[current_step_tool_name].get(
canonical_tool = (
normalize_tool_name_to_canonical(current_step_tool_name)
or current_step_tool_name
)
tool_args_recommend_prompt = ALL_TOOLS.get(canonical_tool, {}).get(
'args_setting', ''
)

Expand Down Expand Up @@ -338,8 +345,12 @@ async def _run_events(self, ctx: InvocationContext) -> AsyncGenerator[Event, Non
yield update_state_event(ctx, state_delta={'matmaster_flow_active': None})

# TODO: needs a better way to handle customized summary prompt
if ALL_TOOLS[current_step_tool_name].get('summary_prompt') is not None:
custom_prompt = ALL_TOOLS[current_step_tool_name].get('summary_prompt')
canonical_tool = (
normalize_tool_name_to_canonical(current_step_tool_name)
or current_step_tool_name
)
if ALL_TOOLS.get(canonical_tool, {}).get('summary_prompt') is not None:
custom_prompt = ALL_TOOLS[canonical_tool].get('summary_prompt')
self.summary_agent.instruction = (
f"{custom_prompt}\n\n{get_vocabulary_enforce_prompt()}"
)
Expand Down
Loading