Skip to content

Syntax typos on https://shiny.posit.co/py/docs/genai-chatbots.html#choose-a-template #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SamEdwardes opened this issue May 5, 2025 · 0 comments

Comments

@SamEdwardes
Copy link

I noticed a few syntax typos on this page: https://shiny.posit.co/py/docs/genai-chatbots.html#choose-a-template. For example:

Image

Should be: from chatlas import ChatOllama

from chatlas import ChatOllama
from shiny.express import ui

# Might instead be ChatAnthropic, ChatOpenAI, or some other provider
chat_client = ChatOllama(model="llama3.2")

chat = ui.Chat(id="my_chat")
chat.ui()

@chat.on_user_submit
async def handle_user_input(user_input: str):
    response = await chat_client.stream_async(user_input)
    await chat.append_message_stream(response)

I didn't check every example, but at least several of them have this error. Here is a link to one example:

from chatlas as ChatOllama

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant