mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 20:14:13 +00:00
add Weaviate memory adapter
This commit is contained in:
parent
70fb70a71c
commit
49763c4452
5 changed files with 240 additions and 4 deletions
|
@ -42,7 +42,10 @@ class MemoryClient(Memory):
|
|||
params={
|
||||
"bank_id": bank_id,
|
||||
},
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
|
||||
},
|
||||
timeout=20,
|
||||
)
|
||||
r.raise_for_status()
|
||||
|
@ -65,7 +68,10 @@ class MemoryClient(Memory):
|
|||
"config": config.dict(),
|
||||
"url": url,
|
||||
},
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
|
||||
},
|
||||
timeout=20,
|
||||
)
|
||||
r.raise_for_status()
|
||||
|
@ -86,7 +92,10 @@ class MemoryClient(Memory):
|
|||
"bank_id": bank_id,
|
||||
"documents": [d.dict() for d in documents],
|
||||
},
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
|
||||
},
|
||||
timeout=20,
|
||||
)
|
||||
r.raise_for_status()
|
||||
|
@ -105,7 +114,10 @@ class MemoryClient(Memory):
|
|||
"query": query,
|
||||
"params": params,
|
||||
},
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
"X-LlamaStack-ProviderData": json.dumps({"weaviate_api_key": "1234"}),
|
||||
},
|
||||
timeout=20,
|
||||
)
|
||||
r.raise_for_status()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue