mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
23 lines
697 B
Python
23 lines
697 B
Python
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."""
|
|
)
|