Refactor test.py to import necessary modules, update code structure, and generate response from LLM model
parent
d905a8a546
commit
0fb6c23c84
1 changed files with 17 additions and 8 deletions
@ -1,10 +1,19 @@ |
||||
from _arango import ArangoDB |
||||
|
||||
arango = ArangoDB() |
||||
initiatives = [i for i in arango.db.collection('eu_initiatives').all()] |
||||
ordered_by_headline = sorted(initiatives, key=lambda x: x['headline']) |
||||
|
||||
s = set() |
||||
for i in ordered_by_headline: |
||||
print(i['headline']) |
||||
s.add(i['headline']) |
||||
print(len(s)) |
||||
initiatives = [i for i in arango.db.collection("eu_initiatives").all()] |
||||
ordered_by_headline = sorted(initiatives, key=lambda x: x["headline"]) |
||||
import env_manager |
||||
import os |
||||
from ollama import Client |
||||
import httpx |
||||
|
||||
|
||||
ollama = Client( |
||||
os.getenv("https://lasseedfast.se/api/chat/"), |
||||
auth=httpx.BasicAuth(username="lasse", password="p239q8wimerxr2m389"), |
||||
) |
||||
|
||||
ollama.generate( |
||||
"What is the European Green Deal?" |
||||
) # This will generate a response from the LLM model |
||||
|
||||
Loading…
Reference in new issue