Skip to content
Snippets Groups Projects
Unverified Commit 25667d45 authored by Marcus Schiesser's avatar Marcus Schiesser Committed by GitHub
Browse files

feat: Make OpenAPI spec usable by custom GPTs (#462)

parent d31910a3
No related branches found
Tags v0.3.23
No related merge requests found
---
"create-llama": patch
---
Make OpenAPI spec usable by custom GPTs
......@@ -16,7 +16,11 @@ def get_query_engine() -> BaseQueryEngine:
return index.as_query_engine()
@r.get("/")
@r.get(
"/",
summary="Get information from the knowledge base",
description="Retrieves relevant information from the knowledge base based on the provided search query. Returns a text response containing the matched information.",
)
async def query_request(
query: str,
) -> str:
......
......@@ -16,7 +16,11 @@ from fastapi import FastAPI
from fastapi.responses import RedirectResponse
from fastapi.staticfiles import StaticFiles
app = FastAPI()
servers = []
app_name = os.getenv("FLY_APP_NAME")
if app_name:
servers = [{"url": f"https://{app_name}.fly.dev"}]
app = FastAPI(servers=servers)
init_settings()
init_observability()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment