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 |
from _arango import ArangoDB |
||||||
|
|
||||||
arango = ArangoDB() |
arango = ArangoDB() |
||||||
initiatives = [i for i in arango.db.collection('eu_initiatives').all()] |
initiatives = [i for i in arango.db.collection("eu_initiatives").all()] |
||||||
ordered_by_headline = sorted(initiatives, key=lambda x: x['headline']) |
ordered_by_headline = sorted(initiatives, key=lambda x: x["headline"]) |
||||||
|
import env_manager |
||||||
s = set() |
import os |
||||||
for i in ordered_by_headline: |
from ollama import Client |
||||||
print(i['headline']) |
import httpx |
||||||
s.add(i['headline']) |
|
||||||
print(len(s)) |
|
||||||
|
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