Fix: API meta for OpenHands (#6295)

This commit is contained in:
tofarr
2025-01-20 09:47:57 -07:00
committed by GitHub
parent 03e496fb60
commit 541a445dfc

View File

@@ -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,