faq/features.md
提示词创建智能体时,如果点击立即创建,需要调用讯飞开放平台的模型能力,请先将AstronAgent与您的讯飞开放平台的应用进行绑定(参考部署文档),然后领取对应模型的额度即可。或者直接点击跳过,使用第三方模型进行会话。
在AstronAgent中使用虚拟人技术需要在讯飞虚拟人官网中申请对应的服务并配置到环境变量中:
⚠️特别注意因虚拟人需要用到浏览器的媒体捕获 API navigator.mediaDevices,所以需要https或者localhost这种安全环境,若您没有这样的环境,chrome浏览器可以设置绕过检查,具体设置如下:
目前需要修改代码并手动更新数据库中的原子树信息。后续版本将提供更便捷的自定义组件开发方式。
支持。可以在 Web 端的工作流节点(如 Agent 智能决策节点)中添加和配置 MCP 工具。
检索到的知识库内容会作为上下文填充到 Prompt 中发送给模型。
可以通过修改提示词(Prompt)来约束模型:例如添加“请仅依据检索到的内容回答,如果检索 内容中没有答案,请直接回复不知道,不要编造”。
worker_processes auto;
worker_rlimit_nofile 65535;
events {
worker_connections 65535;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Log format
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# Access log
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log warn;
# Basic configuration
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# Upload size limit
client_max_body_size 20m;
# Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1000;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/xml+rss
application/javascript
application/json;
server {
listen 80;
server_name localhost;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
# Health check
location /nginx-health {
access_log off;
return 200 "nginx is healthy\n";
add_header Content-Type text/plain;
}
# Redirect all other HTTP traffic to HTTPS
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name localhost;
ssl_certificate /etc/nginx/certs/localhost.pem;
ssl_certificate_key /etc/nginx/certs/localhost-key.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
# Runtime config - no cache (dynamic config file)
location = /runtime-config.js {
proxy_pass http://console-frontend:1881;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# Disable caching for runtime config
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
add_header Pragma "no-cache";
}
# Static resource caching
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
proxy_pass http://console-frontend:1881;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
expires 1y;
add_header Cache-Control "public, immutable";
}
# SSE (Server-Sent Events) API proxy for workflow chat completions
location /workflow/v1/chat/completions {
proxy_pass http://core-workflow:7880/workflow/v1/chat/completions;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# SSE specific settings
proxy_buffering off; # Disable buffering for real-time data transmission
proxy_cache off; # Disable caching
proxy_set_header Connection ''; # SSE uses persistent connections
proxy_http_version 1.1; # Use HTTP/1.1
chunked_transfer_encoding on; # Enable chunked transfer encoding
# Prevent nginx from buffering responses
proxy_set_header X-Accel-Buffering no;
# Timeout settings - SSE requires long-lived connections
proxy_connect_timeout 60s;
proxy_send_timeout 1800s; # 30 minutes send timeout
proxy_read_timeout 1800s; # 30 minutes read timeout
# Set correct headers for SSE
add_header Cache-Control 'no-cache';
add_header X-Accel-Buffering 'no';
}
# SSE (Server-Sent Events) API proxy for chat messages
location /console-api/chat-message/ {
proxy_pass http://console-hub:8080/chat-message/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# SSE specific settings
proxy_buffering off; # Disable buffering for real-time data transmission
proxy_cache off; # Disable caching
proxy_set_header Connection ''; # SSE uses persistent connections
proxy_http_version 1.1; # Use HTTP/1.1
chunked_transfer_encoding on; # Enable chunked transfer encoding
# Prevent nginx from buffering responses
proxy_set_header X-Accel-Buffering no;
# Timeout settings - SSE requires long-lived connections
proxy_connect_timeout 60s;
proxy_send_timeout 1800s; # 30 minutes send timeout
proxy_read_timeout 1800s; # 30 minutes read timeout
# Set correct headers for SSE
add_header Cache-Control 'no-cache';
add_header X-Accel-Buffering 'no';
}
# Backend API proxy - proxy /console-api path to console-hub
location /console-api/ {
proxy_pass http://console-hub:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# Timeout settings
proxy_connect_timeout 30s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
}
# Frontend application proxy - default proxy to console-frontend
location / {
proxy_pass http://console-frontend:1881;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# Timeout settings
proxy_connect_timeout 30s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
}
# Health check
location /nginx-health {
access_log off;
return 200 "nginx is healthy\n";
add_header Content-Type text/plain;
}
}
# Casdoor HTTPS endpoint (same cert, different port)
server {
listen 8000 ssl http2;
server_name localhost;
ssl_certificate /etc/nginx/certs/localhost.pem;
ssl_certificate_key /etc/nginx/certs/localhost-key.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
location / {
proxy_pass http://casdoor:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}
}