Template
feat: add Qdrant recording workflow
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import json, uuid, os
|
||||
|
||||
summary = open('/tmp/summary.txt').read()
|
||||
vector = json.load(open('/tmp/embed_response.json'))['embeddings'][0]
|
||||
point_id = str(uuid.uuid4())
|
||||
|
||||
payload = {
|
||||
"points": [{
|
||||
"id": point_id,
|
||||
"vector": vector,
|
||||
"payload": {
|
||||
"date": os.environ.get('TODAY', ''),
|
||||
"type": "gitea_daily_digest",
|
||||
"record_count": int(os.environ.get('COUNT', '0')),
|
||||
"timestamp": os.environ.get('TIMESTAMP', ''),
|
||||
"content": summary
|
||||
}
|
||||
}]
|
||||
}
|
||||
with open('/tmp/digest_payload.json', 'w') as f:
|
||||
json.dump(payload, f)
|
||||
print(f"Digest Point ID: {point_id}")
|
||||
Reference in New Issue
Block a user