update the naming from WebToolkit to BrowserToolkit in new version and add Azure OpenAI configuration to the app_en.py.

This commit is contained in:
hzm
2025-03-13 17:30:01 +08:00
parent 7407c73951
commit c1fc18efc6
3 changed files with 36 additions and 6 deletions

View File

@@ -5,10 +5,10 @@
# OPENAI_API_BASE_URL=""
# Azure OpenAI API
AZURE_OPENAI_BASE_URL=""
AZURE_API_VERSION=""
AZURE_OPENAI_API_KEY=""
AZURE_DEPLOYMENT_NAME=""
# AZURE_OPENAI_BASE_URL=""
# AZURE_API_VERSION=""
# AZURE_OPENAI_API_KEY=""
# AZURE_DEPLOYMENT_NAME=""
# Qwen API (https://help.aliyun.com/zh/model-studio/developer-reference/get-api-key)

View File

@@ -40,6 +40,7 @@ SCRIPTS = {
"Default": "run.py",
"GAIA Roleplaying": "run_gaia_roleplaying.py",
"OpenAI Compatible": "run_openai_compatiable_model.py",
"Azure OpenAI": "run_azure_openai.py",
"Ollama": "run_ollama.py",
"Terminal": "run_terminal.py",
}
@@ -53,6 +54,7 @@ SCRIPT_DESCRIPTIONS = {
"Default": "Default OWL implementation, uses OpenAI GPT-4o model and full set of tools",
"GAIA Roleplaying": "GAIA benchmark implementation, used to evaluate model capabilities",
"OpenAI Compatible": "Uses third-party models compatible with OpenAI API, supports custom API endpoints",
"Azure OpenAI": "Uses Azure OpenAI API",
"Ollama": "Uses Ollama API",
"Terminal": "Uses local terminal to execute python files",
}
@@ -74,6 +76,34 @@ ENV_GROUPS = {
"required": False,
"help": "Base URL for OpenAI API, optional. Set this if using a proxy or custom endpoint.",
},
{
"name": "AZURE_OPENAI_KEY",
"label": "Azure OpenAI API Key",
"type": "password",
"required": False,
"help": "Azure OpenAI API key for accessing Azure deployed GPT models. Get it from: https://portal.azure.com/",
},
{
"name": "AZURE_OPENAI_ENDPOINT",
"label": "Azure OpenAI Endpoint",
"type": "text",
"required": False,
"help": "Azure OpenAI service endpoint URL",
},
{
"name": "AZURE_DEPLOYMENT_NAME",
"label": "Azure OpenAI Deployment Name",
"type": "text",
"required": False,
"help": "Azure OpenAI service deployment name",
},
{
"name": "AZURE_OPENAI_VERSION",
"label": "Azure OpenAI API Version",
"type": "text",
"required": False,
"help": "Azure OpenAI API version, e.g. 2023-12-01-preview",
},
{
"name": "QWEN_API_KEY",
"label": "Alibaba Cloud Qwen API Key",

View File

@@ -20,7 +20,7 @@ from camel.toolkits import (
ExcelToolkit,
ImageAnalysisToolkit,
SearchToolkit,
WebToolkit,
BrowserToolkit,
FileWriteToolkit,
)
from camel.types import ModelPlatformType
@@ -61,7 +61,7 @@ def construct_society(question: str) -> OwlRolePlaying:
# Configure toolkits
tools = [
*WebToolkit(
*BrowserToolkit(
headless=False, # Set to True for headless mode (e.g., on remote servers)
web_agent_model=models["web"],
planning_agent_model=models["planning"],