mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
Fix: API meta for OpenHands (#6295)
This commit is contained in:
@@ -9,6 +9,7 @@ from fastapi import (
|
||||
)
|
||||
|
||||
import openhands.agenthub # noqa F401 (we import this to get the agents registered)
|
||||
from openhands import __version__
|
||||
from openhands.server.middleware import (
|
||||
AttachConversationMiddleware,
|
||||
InMemoryRateLimiter,
|
||||
@@ -36,7 +37,12 @@ async def _lifespan(app: FastAPI):
|
||||
yield
|
||||
|
||||
|
||||
app = FastAPI(lifespan=_lifespan)
|
||||
app = FastAPI(
|
||||
title='OpenHands',
|
||||
description='OpenHands: Code Less, Make More',
|
||||
version=__version__,
|
||||
lifespan=_lifespan,
|
||||
)
|
||||
app.add_middleware(
|
||||
LocalhostCORSMiddleware,
|
||||
allow_credentials=True,
|
||||
|
||||
Reference in New Issue
Block a user