Skip to content

Commit 14e6e6b

Browse files
remove leftover test file and add to WeaviateRM examples
1 parent 1e29689 commit 14e6e6b

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

dspy/retrieve/weaviate_rm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class WeaviateRM(dspy.Retrieve):
3232
weaviate_client = weaviate.connect_to_[local, wcs, custom, embedded]("your-path-here")
3333
retriever_model = WeaviateRM("my_collection_name", weaviate_client=weaviate_client)
3434
dspy.settings.configure(lm=llm, rm=retriever_model)
35+
36+
retrieve = dspy.Retrieve(k=1)
37+
topK_passages = retrieve("what are the stages in planning, sanctioning and execution of public works").passages
3538
```
3639
3740
Below is a code snippet that shows how to use Weaviate in the forward() function of a module

dspy/retrieve/weaviate_rm_test.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)