Augment
This module contains functionality related to the the augment
script.
Augment
This script is used to handle chat interactions using the ChainLit library and a chat engine. Actions are observed by Langfuse. To make it work vector storage should be filled with the embeddings of the documents. To run the script execute the following command from the root directory of the project:
python src/chat.py
get_cached_initializer()
Initialize the augmentation process and cache it the initializer.
Source code in src/augment.py
22 23 24 25 26 27 |
|
get_data_layer()
Initialize Chainlit's data layer with the custom service.
Returns: |
|
---|
Source code in src/augment.py
30 31 32 33 34 35 36 37 38 39 |
|
main(user_message)
async
Process user messages and generate responses.
Parameters: |
|
---|
Source code in src/augment.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
start()
async
Initialize chat session with chat engine. Sets up session-specific chat engine and displays welcome message.
Source code in src/augment.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|