Skip to content

Commit

Permalink
Close #1581: resolve_id() inside ui.Chat()
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Jul 29, 2024
1 parent 89bab6d commit cd0d92b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shiny/ui/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from .. import _utils, reactive
from .._docstring import add_example
from .._namespaces import resolve_id
from .._namespaces import ResolvedId, resolve_id
from ..session import require_active_session, session_context
from ..types import MISSING, MISSING_TYPE, NotifyException
from ..ui.css import CssUnit, as_css_unit
Expand Down Expand Up @@ -148,8 +148,9 @@ def __init__(
tokenizer: TokenEncoding | MISSING_TYPE | None = MISSING,
):

id = resolve_id(id)
self.id = id
self.user_input_id = f"{id}_user_input"
self.user_input_id = ResolvedId(f"{id}_user_input")
self._transform_user: TransformUserInputAsync | None = None
self._transform_assistant: TransformAssistantResponseChunkAsync | None = None
if isinstance(tokenizer, MISSING_TYPE):
Expand Down

0 comments on commit cd0d92b

Please sign in to comment.