You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have try to chane the "autogpts/autogpt/.env“ AP_SERVER_CORS_ALLOWED_ORIGINS= 0.0.0.0 or a LAN IP . I also chane the AP_SERVER_PORT to 8090, howevery how many times I have change this setting.after I reboot my server an ./run agent start a_agent_name .
the result alway
8888888888
888
888
8888888 .d88b. 888d888 .d88b. .d88b.
888 d88""88b 888P" d88P"88b d8P Y8b
888 888 888 888 888 888 88888888
888 Y88..88P 888 Y88b 888 Y8b.
888 "Y88P" 888 "Y88888 "Y8888
888
Y8b d88P
"Y88P" v0.1.0
[2024-04-16 23:06:31,070] [main ] [INFO] 📝 Agent server starting on http://localhost:8000
✅ Agent application started and available on port 8000
I can't not chage the binding ip and port at all.
then I try to change the code in "/autogpts/autogpt/autogpt/app/agent_protocol_server.py"
class AgentProtocolServer:
_task_budgets: dict[str, ModelProviderBudget]
def __init__(
self,
app_config: Config,
database: AgentDB,
file_storage: FileStorage,
llm_provider: ChatModelProvider,
):
self.app_config = app_config
self.db = database
self.file_storage = file_storage
self.llm_provider = llm_provider
self.agent_manager = AgentManager(file_storage)
self._task_budgets = {}
async def start(self, port: int = 8009, router: APIRouter = base_router):
"""Start the agent server."""
logger.debug("Starting the agent server...")
if not is_port_free(port):
logger.error(f"Port {port} is already in use.")
logger.info(
"You can specify a port by either setting the AP_SERVER_PORT "
"environment variable or defining AP_SERVER_PORT in the .env file."
)
return
config = HypercornConfig()
config.bind = [f"localhost:{port}"]
app = FastAPI(
title="AutoGPT Server",
description="Forked from AutoGPT Forge; "
"Modified version of The Agent Protocol.",
version="v0.4",
)
# Configure CORS middleware
default_origins = [f"http://192.168.0.100:{port}"] # Default only local access
configured_origins = [
origin
for origin in os.getenv("AP_SERVER_CORS_ALLOWED_ORIGINS", "").split(",")
if origin # Empty list if not configured
]
origins = configured_origins or default_origins
app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
I have chane the default_origins = [f"http://192.168.0.100:{port}"] and async def start(self, port: int = 8009, router: APIRouter = base_router):
I reboot system and start autoGpt again. it never change the binding Ip and port
The text was updated successfully, but these errors were encountered:
I have try to chane the "autogpts/autogpt/.env“ AP_SERVER_CORS_ALLOWED_ORIGINS= 0.0.0.0 or a LAN IP . I also chane the AP_SERVER_PORT to 8090, howevery how many times I have change this setting.after I reboot my server an ./run agent start a_agent_name .
the result alway
8888888888
888
888
8888888 .d88b. 888d888 .d88b. .d88b.
888 d88""88b 888P" d88P"88b d8P Y8b
888 888 888 888 888 888 88888888
888 Y88..88P 888 Y88b 888 Y8b.
888 "Y88P" 888 "Y88888 "Y8888
888
Y8b d88P
"Y88P" v0.1.0
[2024-04-16 23:06:31,070] [main ] [INFO] 📝 Agent server starting on http://localhost:8000
✅ Agent application started and available on port 8000
I can't not chage the binding ip and port at all.
then I try to change the code in "/autogpts/autogpt/autogpt/app/agent_protocol_server.py"
class AgentProtocolServer:
_task_budgets: dict[str, ModelProviderBudget]
I have chane the default_origins = [f"http://192.168.0.100:{port}"] and async def start(self, port: int = 8009, router: APIRouter = base_router):
I reboot system and start autoGpt again. it never change the binding Ip and port
The text was updated successfully, but these errors were encountered: