Smarter Prompt
Overview
Smarter Prompt manages prompt sessions and the
integration between the Smarter backend and the ReactJS chat component
used to manage sessions in the Smarter Chat HTML integration, as well as in the command-line interface (CLI).
It is chiefly responsible for storing and retrieving
prompt sessions and messages in the
database, serving the configuration object to the
ReactJS chat component, handling REST API prompt requests,
serving prompt responses, and orchestrating the
Smarter resources associated with a session, including Account,
LLMClient, and Plugin.
Smarter sessions do not expire unless deleted by an administrator as part of MySQL database disk space maintenance operations.
Note
Smarter sessions are distinct from Smarter LLMClients. An LLMClient is a resource that defines the configuration of an llmclient, including its system prompt, plugins, and other settings. A session, by contrast, is an instance of a conversation with an llmclient, comprising the complete history of messages exchanged during that conversation.
Smarter sessions originate in Smarter Prompt, are passed to the ReactJS component as part of the configuration object, and are stored as browser cookies, identified by a GUID-like string that, with a high level of certainty, uniquely identifies the session. Sessions are specific to the device and browser in which they were created; a session started on one device or browser cannot be continued on another.evice/browser, you cannot continue that session on another device/browser.
Usage
# Smarter Prompt Engineer Workbench
curl -X POST http://localhost:9357/api/v1/llm-clients/9/chat/?session_key=e5c0368d6d7201b60f4f20c470f4b5ba36faf45e80ddbe8b04b6cf20f33167a7
# Deployed Smarter LLMClient - Alpha
curl -X GET https://stackademy.3141-5926-5359.alpha.api.example.com/chat/?session_key=<SESSION-KEY>
# Deployed Smarter LLMClient - Production
curl -X GET https://stackademy.3141-5926-5359.api.example.com/chat/?session_key=<SESSION-KEY>