mirror of
https://github.com/open-webui/pipelines
synced 2025-05-12 08:30:43 +00:00
refac
This commit is contained in:
parent
8651356dc4
commit
f91d48aff8
2
main.py
2
main.py
@ -14,7 +14,7 @@ from utils import get_last_user_message, stream_message_template
|
|||||||
from schemas import OpenAIChatCompletionForm
|
from schemas import OpenAIChatCompletionForm
|
||||||
from config import MODEL_ID, MODEL_NAME
|
from config import MODEL_ID, MODEL_NAME
|
||||||
|
|
||||||
from rag_pipeline import get_response
|
from pipeline import get_response
|
||||||
|
|
||||||
app = FastAPI(docs_url="/docs", redoc_url=None)
|
app = FastAPI(docs_url="/docs", redoc_url=None)
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@ from schemas import OpenAIChatMessage
|
|||||||
def get_response(
|
def get_response(
|
||||||
user_message: str, messages: List[OpenAIChatMessage]
|
user_message: str, messages: List[OpenAIChatMessage]
|
||||||
) -> Union[str, Generator]:
|
) -> Union[str, Generator]:
|
||||||
# This is where you can add your custom RAG pipeline.
|
# This is where you can add your custom pipelines like RAG.
|
||||||
# Typically, you would retrieve relevant information from your knowledge base and synthesize it to generate a response.
|
|
||||||
|
|
||||||
print(messages)
|
print(messages)
|
||||||
print(user_message)
|
print(user_message)
|
Loading…
Reference in New Issue
Block a user