Project Documentation

Overview

This project implements a WebSocket client and server for the Ollama API, allowing users to communicate with an Ollama server. The server is designed to handle multiple concurrent connections and stream responses back to clients.

File Structure

Client Implementation (client.py)

The client connects to the Ollama API via WebSocket and handles incoming messages. It supports concurrent connections and logs important events.

Key Functions

Server Implementation (server.py)

The server listens for incoming WebSocket connections and manages message forwarding to and from the Ollama API.

Key Classes

Key Functions

HTML Interface (index.html)

The HTML file provides a user-friendly interface for interacting with the Ollama server. It includes instructions for using the server and a code snippet for the client.

Build and Run Instructions (Makefile)

To set up the project, run the following commands:

  1. Install dependencies:
    make install
  2. Start the server:
    make server
  3. Run the client:
    make client
  4. Execute tests:
    make test

Dependencies (requirements.txt)

The project requires the following Python packages:

Testing (test.py)

The test file contains unit tests to ensure the functionality of the client and server components.

Contribution

Contributions to improve the project are welcome. Please follow the standard practices for submitting issues and pull requests.

License

This project is licensed under the MIT License.