A Backend Server for Serving AI-Generated Text to Your Applications
- LLM's supported (Vicuna or LLama based)
- Weaviate DB
- Websockets for streaming
- REST API
- Long-term memory in your local chats
- Soon have all data local to your network
- Option to use OpenAI
- A simple REST API
MemoryLane uses a number of open source projects to work properly:
- LangChain This runs the llm and has several wrappers for vector databases
- Weaviate This is the main vector database
- Websockets For streaming the text to clients (When langchain supports it)
- [Docker] For your database
And of course Dillinger itself is open source with a [public repository][dill] on GitHub.
MemoryLane uses python 3.10.+
Install the dependencies using pip or windows bat
It's super simple just setup your vector database and get OpenAI API key
windows_install.batI recommend using conda to seperate your environment.
WeaviateDocker This will setup a docker file. Run in this directory.
docker-compose up -dpip install -r requirements.txtRun the main for http server
python main.pyRun the websocket_main for websocket server
python websocket_main.pyClients and Server will send and receive JSON request for AI responses. Client:
{
complete_prompt: str the complete prompt to send to the AI (required),
chat_text: dict the chat format string to send to the AI
{user_name: str - the user side of the chat format string
ai_name: str - the ai side of the chat format string},
chat (required): dict - the chat to send to the AI
{user_text: str - the user's text,
ai_text: str - the ai's text},
names (required): dict - the names for the user and the ai
{user_name: str - the user's name,
ai_name: str - the ai's name},
args: dict - the arguments to send to the AI (optional) (history is required)
{history (required): str - the history of the conversation},
save (optional): bool - whether to save the prompt to the database (default: False),
memory (optional): bool - whether to use the memory (default: False)
}Server:
{
status: int | SERVER_CODES - the status code [23: success, -1: error, 0: running],
token: str - the token that got generated,
prompt: str - the prompt that got generated,
error: str - the error message if there was an error
}Want to contribute? Great!
Just make a pull request when done.
MIT
Happy Devving