Merge branch 'dev' into feature/cog-3155-engineering-make-notebook-cognee-usage-identical-across-uis
This commit is contained in:
commit
30430ed122
2 changed files with 25 additions and 17 deletions
33
.github/workflows/weighted_edges_tests.yml
vendored
33
.github/workflows/weighted_edges_tests.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Weighted Edges Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, weighted_edges ]
|
branches: [ main, dev, weighted_edges ]
|
||||||
paths:
|
paths:
|
||||||
- 'cognee/modules/graph/utils/get_graph_from_model.py'
|
- 'cognee/modules/graph/utils/get_graph_from_model.py'
|
||||||
- 'cognee/infrastructure/engine/models/Edge.py'
|
- 'cognee/infrastructure/engine/models/Edge.py'
|
||||||
|
|
@ -10,7 +10,7 @@ on:
|
||||||
- 'examples/python/weighted_edges_example.py'
|
- 'examples/python/weighted_edges_example.py'
|
||||||
- '.github/workflows/weighted_edges_tests.yml'
|
- '.github/workflows/weighted_edges_tests.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
branches: [ main, dev ]
|
||||||
paths:
|
paths:
|
||||||
- 'cognee/modules/graph/utils/get_graph_from_model.py'
|
- 'cognee/modules/graph/utils/get_graph_from_model.py'
|
||||||
- 'cognee/infrastructure/engine/models/Edge.py'
|
- 'cognee/infrastructure/engine/models/Edge.py'
|
||||||
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
LLM_PROVIDER: openai
|
LLM_PROVIDER: openai
|
||||||
LLM_MODEL: gpt-5-mini
|
LLM_MODEL: gpt-5-mini
|
||||||
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
|
|
@ -67,14 +67,13 @@ jobs:
|
||||||
env:
|
env:
|
||||||
LLM_PROVIDER: openai
|
LLM_PROVIDER: openai
|
||||||
LLM_MODEL: gpt-5-mini
|
LLM_MODEL: gpt-5-mini
|
||||||
LLM_ENDPOINT: https://api.openai.com/v1/
|
LLM_ENDPOINT: https://api.openai.com/v1
|
||||||
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
LLM_API_VERSION: "2024-02-01"
|
LLM_API_VERSION: "2024-02-01"
|
||||||
EMBEDDING_PROVIDER: openai
|
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
|
||||||
EMBEDDING_MODEL: text-embedding-3-small
|
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
|
||||||
EMBEDDING_ENDPOINT: https://api.openai.com/v1/
|
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
|
||||||
EMBEDDING_API_KEY: ${{ secrets.LLM_API_KEY }}
|
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
|
||||||
EMBEDDING_API_VERSION: "2024-02-01"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -108,14 +107,14 @@ jobs:
|
||||||
env:
|
env:
|
||||||
LLM_PROVIDER: openai
|
LLM_PROVIDER: openai
|
||||||
LLM_MODEL: gpt-5-mini
|
LLM_MODEL: gpt-5-mini
|
||||||
LLM_ENDPOINT: https://api.openai.com/v1/
|
LLM_ENDPOINT: https://api.openai.com/v1
|
||||||
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||||
LLM_API_VERSION: "2024-02-01"
|
LLM_API_VERSION: "2024-02-01"
|
||||||
EMBEDDING_PROVIDER: openai
|
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
|
||||||
EMBEDDING_MODEL: text-embedding-3-small
|
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
|
||||||
EMBEDDING_ENDPOINT: https://api.openai.com/v1/
|
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
|
||||||
EMBEDDING_API_KEY: ${{ secrets.LLM_API_KEY }}
|
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
|
||||||
EMBEDDING_API_VERSION: "2024-02-01"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
|
||||||
|
|
@ -416,6 +416,15 @@ class NeptuneAnalyticsAdapter(NeptuneGraphDB, VectorDBInterface):
|
||||||
self._client.query(f"MATCH (n :{self._VECTOR_NODE_LABEL}) DETACH DELETE n")
|
self._client.query(f"MATCH (n :{self._VECTOR_NODE_LABEL}) DETACH DELETE n")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
async def is_empty(self) -> bool:
|
||||||
|
query = """
|
||||||
|
MATCH (n)
|
||||||
|
RETURN true
|
||||||
|
LIMIT 1;
|
||||||
|
"""
|
||||||
|
query_result = await self._client.query(query)
|
||||||
|
return len(query_result) == 0
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_scored_result(
|
def _get_scored_result(
|
||||||
item: dict, with_vector: bool = False, with_score: bool = False
|
item: dict, with_vector: bool = False, with_score: bool = False
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue