Seungwoo hong
๐Ÿš‘ fix: Update Dockerfile to use python:3.10-slim instead of python:3.9 and add comments about Docker execution
30d7adf
raw
history blame
641 Bytes
from fastapi import FastAPI
import autorag # AutoRAG ํŒจํ‚ค์ง€๋ฅผ import ํ•ฉ๋‹ˆ๋‹ค. ์‹ค์ œ ํŒจํ‚ค์ง€ ์ด๋ฆ„์€ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
app = FastAPI()
@app.get("/")
def greet_json():
# AutoRAG๋ฅผ ์‹คํ–‰ํ•˜๊ณ  ๋ฒ„์ „์„ ์ถœ๋ ฅ
autorag_version = autorag.__version__ # AutoRAG์˜ ๋ฒ„์ „์„ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
# ์—ฌ๊ธฐ์— AutoRAG๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
# ์˜ˆ: result = autorag.run_some_function()
return {
"Hello": "AutoRAG World!",
"AutoRAG Version": autorag_version,
# "AutoRAG Result": result # AutoRAG ์‹คํ–‰ ๊ฒฐ๊ณผ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
}