Merge branch 'main' into feat/COG-544-eval-on-swe-bench

This commit is contained in:
Rita Aleksziev 2024-11-19 09:38:11 +01:00
commit 9973afffa1
7 changed files with 36 additions and 22 deletions

View file

@ -8,14 +8,14 @@ GRAPHISTRY_PASSWORD=
SENTRY_REPORTING_URL= SENTRY_REPORTING_URL=
# "neo4j" or "networkx" # "neo4j" or "networkx"
GRAPH_DATABASE_PROVIDER="neo4j" GRAPH_DATABASE_PROVIDER="networkx"
# Not needed if using networkx # Not needed if using networkx
GRAPH_DATABASE_URL= GRAPH_DATABASE_URL=
GRAPH_DATABASE_USERNAME= GRAPH_DATABASE_USERNAME=
GRAPH_DATABASE_PASSWORD= GRAPH_DATABASE_PASSWORD=
# "qdrant", "pgvector", "weaviate" or "lancedb" # "qdrant", "pgvector", "weaviate" or "lancedb"
VECTOR_DB_PROVIDER="qdrant" VECTOR_DB_PROVIDER="lancedb"
# Not needed if using "lancedb" or "pgvector" # Not needed if using "lancedb" or "pgvector"
VECTOR_DB_URL= VECTOR_DB_URL=
VECTOR_DB_KEY= VECTOR_DB_KEY=

View file

@ -46,7 +46,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
poetry install --no-interaction --all-extras --no-root poetry install --no-interaction --all-extras
poetry add jupyter --no-interaction poetry add jupyter --no-interaction
- name: Execute Jupyter Notebook - name: Execute Jupyter Notebook

View file

@ -18,9 +18,6 @@ Try it in a Google Colab <a href="https://colab.research.google.com/drive/1g-Qn
If you have questions, join our <a href="https://discord.gg/NQPKmU5CCg">Discord</a> community If you have questions, join our <a href="https://discord.gg/NQPKmU5CCg">Discord</a> community
## 📦 Installation ## 📦 Installation
### With pip ### With pip
@ -47,6 +44,7 @@ poetry add cognee
poetry add cognee -E postgres poetry add cognee -E postgres
``` ```
## 💻 Basic Usage ## 💻 Basic Usage
### Setup ### Setup
@ -83,7 +81,7 @@ docker-compose up
``` ```
Then navigate to localhost:3000 Then navigate to localhost:3000
If you want to use the UI with PostgreSQL through docker-compose make sure to set the following values in the .env file: If you want to use Cognee with PostgreSQL, make sure to set the following values in the .env file:
``` ```
DB_PROVIDER=postgres DB_PROVIDER=postgres
@ -99,8 +97,6 @@ DB_PASSWORD=cognee
First, copy `.env.template` to `.env` and add your OpenAI API key to the LLM_API_KEY field. First, copy `.env.template` to `.env` and add your OpenAI API key to the LLM_API_KEY field.
Optionally, set `VECTOR_DB_PROVIDER="lancedb"` in `.env` to simplify setup.
This script will run the default pipeline: This script will run the default pipeline:
```python ```python
@ -140,7 +136,7 @@ async def main():
asyncio.run(main()) asyncio.run(main())
``` ```
A version of this example is here: `examples/pyton/simple_example.py` A version of this example is here: `examples/python/simple_example.py`
### Create your own memory store ### Create your own memory store
@ -251,7 +247,6 @@ Cognee supports a variety of tools and services for different operations:
Check out our demo notebook [here](https://github.com/topoteretes/cognee/blob/main/notebooks/cognee_demo.ipynb) Check out our demo notebook [here](https://github.com/topoteretes/cognee/blob/main/notebooks/cognee_demo.ipynb)
[<img src="https://i3.ytimg.com/vi/-ARUfIzhzC4/maxresdefault.jpg" width="100%">](https://www.youtube.com/watch?v=BDFt4xVPmro "Learn about cognee: 55") [<img src="https://i3.ytimg.com/vi/-ARUfIzhzC4/maxresdefault.jpg" width="100%">](https://www.youtube.com/watch?v=BDFt4xVPmro "Learn about cognee: 55")
@ -274,11 +269,6 @@ Please see the cognee [Development Guide](https://topoteretes.github.io/cognee/q
pip install cognee pip install cognee
``` ```
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=topoteretes/cognee&type=Date)](https://star-history.com/#topoteretes/cognee&Date)
## 💫 Contributors ## 💫 Contributors
<a href="https://github.com/topoteretes/cognee/graphs/contributors"> <a href="https://github.com/topoteretes/cognee/graphs/contributors">
@ -286,3 +276,25 @@ pip install cognee
</a> </a>
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=topoteretes/cognee&type=Date)](https://star-history.com/#topoteretes/cognee&Date)
## Vector & Graph Databases Implementation State
<style>
table {
width: 100%;
}
</style>
| Name | Type | Current state | Known Issues |
|------------------|--------------------|-------------------|---------------------------------------|
| Qdrant | Vector | Stable &#x2705; | |
| Weaviate | Vector | Stable &#x2705; | |
| LanceDB | Vector | Stable &#x2705; | |
| Neo4j | Graph | Stable &#x2705; | |
| NetworkX | Graph | Stable &#x2705; | |
| FalkorDB | Vector/Graph | Unstable &#x274C; | |
| PGVector | Vector | Unstable &#x274C; | Postgres DB returns the Timeout error |

View file

@ -30,8 +30,8 @@ const defaultProvider = {
}; };
const defaultModel = { const defaultModel = {
label: 'gpt-4o', label: 'gpt-4o-mini',
value: 'gpt-4o', value: 'gpt-4o-mini',
}; };
export default function Settings({ onDone = () => {}, submitButtonText = 'Save' }) { export default function Settings({ onDone = () => {}, submitButtonText = 'Save' }) {

View file

@ -4,7 +4,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
class LLMConfig(BaseSettings): class LLMConfig(BaseSettings):
llm_provider: str = "openai" llm_provider: str = "openai"
llm_model: str = "gpt-4o" llm_model: str = "gpt-4o-mini"
llm_endpoint: str = "" llm_endpoint: str = ""
llm_api_key: Optional[str] = None llm_api_key: Optional[str] = None
llm_temperature: float = 0.0 llm_temperature: float = 0.0

View file

@ -73,6 +73,9 @@ def get_settings() -> SettingsDict:
"providers": llm_providers, "providers": llm_providers,
"models": { "models": {
"openai": [{ "openai": [{
"value": "gpt-4o-mini",
"label": "gpt-4o-mini",
}, {
"value": "gpt-4o", "value": "gpt-4o",
"label": "gpt-4o", "label": "gpt-4o",
}, { }, {

View file

@ -6,7 +6,6 @@ from cognee.api.v1.search import SearchType
# 1. Copy `.env.template` and rename it to `.env`. # 1. Copy `.env.template` and rename it to `.env`.
# 2. Add your OpenAI API key to the `.env` file in the `LLM_API_KEY` field: # 2. Add your OpenAI API key to the `.env` file in the `LLM_API_KEY` field:
# LLM_API_KEY = "your_key_here" # LLM_API_KEY = "your_key_here"
# 3. (Optional) To minimize setup effort, set `VECTOR_DB_PROVIDER="lancedb"` in `.env".
async def main(): async def main():
# Create a clean slate for cognee -- reset data and system state # Create a clean slate for cognee -- reset data and system state