Updates to the configs
This commit is contained in:
parent
409d3c7d8b
commit
a197177676
3 changed files with 21 additions and 4 deletions
|
|
@ -95,10 +95,9 @@ cognee.add([text], "example_dataset") # Add a new piece of information
|
|||
|
||||
cognee.cognify() # Use LLMs and cognee to create knowledge
|
||||
|
||||
search_results = cognee.search("SIMILARITY", "computer science") # Query cognee for the knowledge
|
||||
search_results = cognee.search("SIMILARITY", {'query': 'Tell me about NLP'}) # Query cognee for the knowledge
|
||||
|
||||
for result_text in search_results[0]:
|
||||
print(result_text)
|
||||
print(search_results)
|
||||
|
||||
```
|
||||
Add alternative data types:
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ async def cognify(datasets: Union[str, List[str]] = None):
|
|||
logger.warning("File (%s) has an unknown file type. We are skipping it.", file_metadata["id"])
|
||||
|
||||
added_chunks = await add_data_chunks(data_chunks)
|
||||
await add_data_chunks_basic_rag(data_chunks)
|
||||
# await add_data_chunks_basic_rag(data_chunks)
|
||||
|
||||
await asyncio.gather(
|
||||
*[process_text(
|
||||
|
|
|
|||
|
|
@ -105,3 +105,21 @@ class config():
|
|||
chunk_config = get_chunk_config()
|
||||
chunk_config.chunk_size = chunk_size
|
||||
|
||||
|
||||
@staticmethod
|
||||
def set_vector_engine_provider(vector_engine_provider: str):
|
||||
vector_db_config = get_vectordb_config()
|
||||
vector_db_config.vector_engine_provider = vector_engine_provider
|
||||
|
||||
@staticmethod
|
||||
def set_vector_db_key(db_key: str):
|
||||
vector_db_config = get_vectordb_config()
|
||||
vector_db_config.vector_db_key = db_key
|
||||
|
||||
|
||||
@staticmethod
|
||||
def set_vector_db_url(db_url: str):
|
||||
vector_db_config = get_vectordb_config()
|
||||
vector_db_config.vector_db_url = db_url
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue