mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Agent Protocol v1 (#5254)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
1
.github/workflows/autogpts-ci.yml
vendored
1
.github/workflows/autogpts-ci.yml
vendored
@@ -42,7 +42,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sh run &
|
sh run &
|
||||||
sleep 20
|
sleep 20
|
||||||
URL=http://127.0.0.1:8000 bash -c "$(curl -fsSL https://raw.githubusercontent.com/AI-Engineers-Foundation/agent-protocol/main/testing_suite/test.sh)"
|
|
||||||
poetry run agbenchmark --mock
|
poetry run agbenchmark --mock
|
||||||
poetry run agbenchmark --test=WriteFile
|
poetry run agbenchmark --test=WriteFile
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -55,14 +55,14 @@ class Agent:
|
|||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
app.include_router(router, prefix="/api/v1")
|
app.include_router(router, prefix="/ap/v1")
|
||||||
app.mount("/app", StaticFiles(directory="../../frontend/build/web"), name="app")
|
# app.mount("/app", StaticFiles(directory="../../frontend/build/web"), name="app")
|
||||||
app.add_middleware(AgentMiddleware, agent=self)
|
app.add_middleware(AgentMiddleware, agent=self)
|
||||||
|
|
||||||
@app.get("/", include_in_schema=False)
|
@app.get("/", include_in_schema=False)
|
||||||
async def root():
|
async def root():
|
||||||
return RedirectResponse(url='/app/index.html', status_code=307)
|
return RedirectResponse(url='/app/index.html', status_code=307)
|
||||||
|
|
||||||
config.loglevel = "ERROR"
|
config.loglevel = "ERROR"
|
||||||
config.bind = [f"0.0.0.0:{port}"]
|
config.bind = [f"0.0.0.0:{port}"]
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ async def run_api_agent(
|
|||||||
) -> None:
|
) -> None:
|
||||||
host_value = None
|
host_value = None
|
||||||
|
|
||||||
configuration = Configuration(host=config["AgentBenchmarkConfig"].host)
|
configuration = Configuration(host=config["AgentBenchmarkConfig"].host + "/ap/v1")
|
||||||
async with ApiClient(configuration) as api_client:
|
async with ApiClient(configuration) as api_client:
|
||||||
api_instance = AgentApi(api_client)
|
api_instance = AgentApi(api_client)
|
||||||
task_request_body = TaskRequestBody(input=task.task)
|
task_request_body = TaskRequestBody(input=task.task)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void main() async {
|
|||||||
MultiProvider(
|
MultiProvider(
|
||||||
providers: [
|
providers: [
|
||||||
Provider(
|
Provider(
|
||||||
create: (context) => RestApiUtility("http://127.0.0.1:8000/api/v1"),
|
create: (context) => RestApiUtility("http://127.0.0.1:8000/ap/v1"),
|
||||||
),
|
),
|
||||||
ProxyProvider<RestApiUtility, ChatService>(
|
ProxyProvider<RestApiUtility, ChatService>(
|
||||||
update: (context, restApiUtility, chatService) =>
|
update: (context, restApiUtility, chatService) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user