Skip to content

Commit 89fe652

Browse files
committed
fix: typing in RAG template
1 parent 5b1e70e commit 89fe652

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "create-ragbits-app"
3-
version = "0.0.9"
3+
version = "0.0.10"
44
description = "Set up a modern LLM app by running one command"
55
readme = "README.md"
66
requires-python = ">=3.11"

src/create_ragbits_app/templates/rag/src/{{pkg_name}}/main.py.j2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ from collections.abc import AsyncGenerator
1111
from pydantic import BaseModel
1212
from ragbits.core.prompt import Prompt
1313
from ragbits.chat.interface import ChatInterface
14-
from ragbits.chat.interface.types import ChatResponse, Message
14+
from ragbits.chat.interface.types import ChatResponse, ChatContext
15+
from ragbits.core.prompt.base import ChatFormat
1516
from {{pkg_name}}.prompt_qa import QAPrompt, QAPromptInput
1617
from {{pkg_name}}.components import get_llm, get_document_search
1718
{%- if observability %}
@@ -32,8 +33,8 @@ class ChatApp(ChatInterface):
3233
async def chat(
3334
self,
3435
message: str,
35-
history: list[Message] | None = None,
36-
context: dict | None = None,
36+
history: ChatFormat| None = None,
37+
context: ChatContext | None = None,
3738
) -> AsyncGenerator[ChatResponse, None]:
3839
# Search for relevant documents
3940
search_results = await self.document_search.search(message)

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)