Skip to content

Consider removing commons_server() from API #171

Description

@cpsievert

And using shinychat::chat_server() instead.

Currently, commons_server() does 3 things:

  1. Creates a commons_server_start span.
    • Could be removed considering that Shiny already has instrumentation for the session's lifecycle?
  2. Creates a conversation id.
  3. "Pre-warms" the client (i.e., builds the index, etc).
    • We might want to revisit how this works, but regardless, it might be better if this was explicit rather than implicit. Essentially the (recommended) API would change from:
client <- ...
commons_server("chat", client)

to

client <- ...
client$prewarm()
chat_server("chat", client)

I'm not sure if it's possible today, but at least at some point it should be possible to prewarm/cache the index independently of the shiny runtime. In that case, you might not want the pre-warming at all (i.e., you only update the index as the knowledge base gets updated).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions