mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-19 13:23:16 +08:00
patch fastapi-offline to use local swagger-ui assests
This commit is contained in:
parent
b733a47902
commit
18e7e7307b
@ -6,7 +6,7 @@ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
|
||||
from configs.model_config import NLTK_DATA_PATH, OPEN_CROSS_DOMAIN
|
||||
import argparse
|
||||
import uvicorn
|
||||
from fastapi_offline import FastAPIOffline as FastAPI
|
||||
from server.utils import FastAPIOffline as FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from starlette.responses import RedirectResponse
|
||||
from server.chat import (chat, knowledge_base_chat, openai_chat,
|
||||
|
||||
1782
server/static/redoc.standalone.js
Normal file
1782
server/static/redoc.standalone.js
Normal file
File diff suppressed because one or more lines are too long
9
server/static/swagger-ui-bundle.js
Normal file
9
server/static/swagger-ui-bundle.js
Normal file
File diff suppressed because one or more lines are too long
9
server/static/swagger-ui.css
Normal file
9
server/static/swagger-ui.css
Normal file
File diff suppressed because one or more lines are too long
@ -2,6 +2,14 @@ import pydantic
|
||||
from pydantic import BaseModel
|
||||
from typing import List
|
||||
import torch
|
||||
from fastapi_offline import FastAPIOffline
|
||||
import fastapi_offline
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
# patch fastapi_offline to use local static assests
|
||||
fastapi_offline.core._STATIC_PATH = Path(__file__).parent / "static"
|
||||
|
||||
|
||||
class BaseResponse(BaseModel):
|
||||
code: int = pydantic.Field(200, description="HTTP status code")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user