Skip to content

Commit

Permalink
Deprecate modellist and add reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
ruecat committed Jan 30, 2024
1 parent fe98416 commit 90c4dd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
11 changes: 0 additions & 11 deletions bot/func/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@


# Ollama API
async def model_list():
async with aiohttp.ClientSession() as session:
url = f"http://{ollama_base_url}:11434/api/tags"
async with session.get(url) as response:
if response.status == 200:
data = await response.json()
return data["models"]
else:
return []


async def generate(payload: dict, modelname: str, prompt: str):
# try:
async with aiohttp.ClientSession() as session:
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
python-dotenv==1.0.0
aiogram==3.2.0
aiogram==3.2.0
ollama

0 comments on commit 90c4dd8

Please sign in to comment.