From 793075ca11cd65efa8019b1b2ab18a9427ef1a80 Mon Sep 17 00:00:00 2001 From: Tomaz Bratanic Date: Wed, 9 Oct 2024 22:02:49 +0530 Subject: [PATCH 1/2] Fix neo4j database connection (#16444) --- .../llama_index/graph_stores/neo4j/base.py | 4 ++-- .../llama_index/graph_stores/neo4j/neo4j_property_graph.py | 4 ++-- .../llama-index-graph-stores-neo4j/pyproject.toml | 2 +- .../llama_index/vector_stores/neo4jvector/base.py | 4 ++-- .../llama-index-vector-stores-neo4jvector/pyproject.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/base.py b/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/base.py index db6b31ef7b0d8..d5bfe71827a8f 100644 --- a/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/base.py +++ b/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/base.py @@ -253,7 +253,7 @@ def query(self, query: str, param_map: Optional[Dict[str, Any]] = None) -> Any: param_map = param_map or {} try: data, _, _ = self._driver.execute_query( - query, database=self._database, parameters_=param_map + query, database_=self._database, parameters_=param_map ) return [r.data() for r in data] except neo4j.exceptions.Neo4jError as e: @@ -276,6 +276,6 @@ def query(self, query: str, param_map: Optional[Dict[str, Any]] = None) -> Any: ): raise # Fallback to allow implicit transactions - with self._driver.session() as session: + with self._driver.session(database=self._database) as session: data = session.run(neo4j.Query(text=query), param_map) return [r.data() for r in data] diff --git a/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/neo4j_property_graph.py b/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/neo4j_property_graph.py index 1c71c16ab807d..35a71a7d11865 100644 --- a/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/neo4j_property_graph.py +++ b/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/llama_index/graph_stores/neo4j/neo4j_property_graph.py @@ -586,7 +586,7 @@ def structured_query( param_map = param_map or {} try: data, _, _ = self._driver.execute_query( - query, database=self._database, parameters_=param_map + query, database_=self._database, parameters_=param_map ) full_result = [d.data() for d in data] @@ -613,7 +613,7 @@ def structured_query( ): raise # Fallback to allow implicit transactions - with self._driver.session() as session: + with self._driver.session(database=self._database) as session: data = session.run(neo4j.Query(text=query), param_map) full_result = [d.data() for d in data] diff --git a/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/pyproject.toml b/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/pyproject.toml index ad522d116f876..39c96a53a20d1 100644 --- a/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/pyproject.toml +++ b/llama-index-integrations/graph_stores/llama-index-graph-stores-neo4j/pyproject.toml @@ -28,7 +28,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-graph-stores-neo4j" readme = "README.md" -version = "0.3.2" +version = "0.3.3" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/llama_index/vector_stores/neo4jvector/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/llama_index/vector_stores/neo4jvector/base.py index 226877eff0b46..c16f81ae3c4a9 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/llama_index/vector_stores/neo4jvector/base.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/llama_index/vector_stores/neo4jvector/base.py @@ -442,7 +442,7 @@ def database_query( params = params or {} try: data, _, _ = self._driver.execute_query( - query, database=self._database, parameters_=params + query, database_=self._database, parameters_=params ) return [r.data() for r in data] except neo4j.exceptions.Neo4jError as e: @@ -465,7 +465,7 @@ def database_query( ): raise # Fallback to allow implicit transactions - with self._driver.session() as session: + with self._driver.session(database=self._database) as session: data = session.run(neo4j.Query(text=query), params) return [r.data() for r in data] diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/pyproject.toml b/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/pyproject.toml index 190aa492125ab..b9beddd58b347 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/pyproject.toml +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-neo4jvector/pyproject.toml @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-vector-stores-neo4jvector" readme = "README.md" -version = "0.2.2" +version = "0.2.3" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" From 886e690313872d7d1da85014c60c8c43dff1e150 Mon Sep 17 00:00:00 2001 From: Gael Grosch <3279847+Digma@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:54:12 +0200 Subject: [PATCH 2/2] feat: add chatpgt-4o-latest model (#16448) --- .../llama-index-llms-openai/llama_index/llms/openai/utils.py | 2 ++ .../llms/llama-index-llms-openai/pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py b/llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py index f43e8f4180d0a..76a02ba2898ab 100644 --- a/llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py +++ b/llama-index-integrations/llms/llama-index-llms-openai/llama_index/llms/openai/utils.py @@ -54,6 +54,8 @@ "gpt-4o": 128000, "gpt-4o-2024-05-13": 128000, "gpt-4o-2024-08-06": 128000, + # Intended for research and evaluation + "chatgpt-4o-latest": 128000, "gpt-4o-mini": 128000, "gpt-4o-mini-2024-07-18": 128000, # 0613 models (function calling): diff --git a/llama-index-integrations/llms/llama-index-llms-openai/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-openai/pyproject.toml index ccba47ea29e4f..af3c60e0c50bd 100644 --- a/llama-index-integrations/llms/llama-index-llms-openai/pyproject.toml +++ b/llama-index-integrations/llms/llama-index-llms-openai/pyproject.toml @@ -29,7 +29,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-llms-openai" readme = "README.md" -version = "0.2.12" +version = "0.2.13" [tool.poetry.dependencies] python = ">=3.8.1,<4.0"