mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-25 08:08:14 +00:00
First take on a rag tool
This commit is contained in:
22
tests/adapters/lancedb_adapter_test.py
Normal file
22
tests/adapters/lancedb_adapter_test.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from crewai_tools.adapters.lancedb_adapter import LanceDBAdapter
|
||||
|
||||
|
||||
def test_lancedb_adapter(helpers):
|
||||
adapter = LanceDBAdapter(
|
||||
uri="tests/data/lancedb",
|
||||
table_name="requirements",
|
||||
embedding_function=helpers.get_embedding_function(),
|
||||
top_k=2,
|
||||
vector_column_name="vector",
|
||||
text_column_name="text",
|
||||
)
|
||||
|
||||
assert (
|
||||
adapter.query("What are the requirements for the task?")
|
||||
== """Technical requirements
|
||||
|
||||
The system should be able to process 1000 transactions per second. The code must be written in Ruby.
|
||||
Problem
|
||||
|
||||
Currently, we are not able to find out palindromes in a given string. We need a solution to this problem."""
|
||||
)
|
||||
Reference in New Issue
Block a user