public
Handle New Chat Message
This endpoint is both used for all the following purposes:
- Sending a new message in the session
- Regenerating a message in the session (just send the same one again)
- Editing a message (similar to regenerating but sending a different message)
- Kicking off a seeded chat session (set use_existing_user_message)
Assumes that previous messages have been set as the latest to minimize overhead.
Args: chat_message_req (CreateChatMessageRequest): Details about the new chat message. request (Request): The current HTTP request context. user (User | None): The current user, obtained via dependency injection. _ (None): Rate limit check is run if user/group/global rate limits are enabled.
Returns: StreamingResponse: Streams the response to the new chat message.
post/chat/send-message
Request body
Response
Successful Response
{"stackTrail":"paths:/chat/send-message:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}