From 165f49620cec0272952f3bc03001a5dbabd6b2ef Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Mon, 3 Jun 2024 11:09:18 -0400 Subject: some cleanup --- runpod/main.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 runpod/main.py (limited to 'runpod/main.py') diff --git a/runpod/main.py b/runpod/main.py deleted file mode 100755 index ae12ba4..0000000 --- a/runpod/main.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -"""ollama-runpod endpoint""" - - -import runpod -import requests - - -def ollama(job): - """the endpoint handler""" - headers = {"Content-Type": "application/json"} - data = { - "model": job["model"], - "system": job["prompt_system"], - "prompt": job["prompt_user"] + job["content"], - "stream": False, - "format": "json", - "options": { - "temperature": job["temp"], - }, - } - - response = requests.post( - "http://127.0.0.1:11434/api/generate", data=data, headers=headers, timeout=10 - ) - - return response - - -def main() -> None: - """entrypoint""" - runpod.serverless({"handler": ollama}) -- cgit v1.2.3