mirror of
https://github.com/open-webui/pipelines
synced 2025-05-18 03:04:50 +00:00
15 lines
459 B
Python
15 lines
459 B
Python
from typing import List, Union, Generator
|
|
from schemas import OpenAIChatMessage
|
|
|
|
|
|
def get_response(
|
|
user_message: str, messages: List[OpenAIChatMessage]
|
|
) -> Union[str, Generator]:
|
|
# This is where you can add your custom RAG pipeline.
|
|
# Typically, you would retrieve relevant information from your knowledge base and synthesize it to generate a response.
|
|
|
|
print(messages)
|
|
print(user_message)
|
|
|
|
return f"rag response to: {user_message}"
|