Skip to content

Instantly share code, notes, and snippets.

View t41372's full-sized avatar

Yi-Ting Chiu t41372

View GitHub Profile
@t41372
t41372 / ollama.py
Last active June 8, 2024 16:34
Using Ollama API in Python with memory and system prompt
# This file is responsible for the communicating with the Ollama Server
import json
import requests
class Ollama:
'''
This class is responsible for communicating with the Ollama Server.
The conversation memory is stored inside this class.
'''