Skip to content

A fastAPI & langchain based application to talk about your finances.

Notifications You must be signed in to change notification settings

rupeesense/chatty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatty

Development

Runt the application using:

uvicorn app.main:app --reload

Client Guide to the Chat WebSocket Endpoint

Establishing a Connection

For local development, we can use websocat:

websocat ws://127.0.0.1:8000/ws/chat -H "X-User-ID: 12345"

Initiating a Conversation

After establishing the connection, clients can start a new conversation by sending the following JSON message:

{
  "type": "start_conversation"
}

Upon successful initiation, the server will respond with a message indicating the ID of the new conversation.

Resuming a Previous Conversation

If clients have a conversation ID from a previous session and want to resume that conversation, they can send the following JSON message:

{
  "type": "resume_conversation",
  "conversationId": "[Your_Previous_Conversation_ID]"
}

Replace [Your_Previous_Conversation_ID] with the actual ID of the conversation you want to resume.

The server will respond, confirming the conversation's resumption or notifying the client if no matching conversation is found.

Sending Messages

Once either a new conversation has been started or a previous one has been resumed, clients can send regular chat messages in the following format:

{
  "sender": "[Sender_Type]",
  "content": "[Your_Message_Content]"
}

Replace [Sender_Type] with the type of sender (e.g., user) and [Your_Message_Content] with the actual content of the message.

Receiving Messages

Clients should also be set up to receive messages from the server. This can include responses to their messages or any other information the server wishes to convey.

About

A fastAPI & langchain based application to talk about your finances.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published