From 19fbace84ce3e88538456699a7434a16d61b9fb0 Mon Sep 17 00:00:00 2001 From: willtai Date: Tue, 10 Sep 2024 13:26:59 +0100 Subject: [PATCH] Changed model in t2c examples to gpt-3.5-turbo-0125 (#125) * Changed model in t2c examples to gpt-3.5-turbo-0125 * Use more generic gpt-3.5-turbo in example and doc for Text2CypherRetriever --- docs/source/user_guide_rag.rst | 2 +- examples/text2cypher_search.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/user_guide_rag.rst b/docs/source/user_guide_rag.rst index 94379553..f4f77124 100644 --- a/docs/source/user_guide_rag.rst +++ b/docs/source/user_guide_rag.rst @@ -616,7 +616,7 @@ LLMs can be different. driver = GraphDatabase.driver(URI, auth=AUTH) # Create LLM object - llm = OpenAILLM(model_name="gpt-3.5-turbo-instruct") + llm = OpenAILLM(model_name="gpt-3.5-turbo") # (Optional) Specify your own Neo4j schema neo4j_schema = """ diff --git a/examples/text2cypher_search.py b/examples/text2cypher_search.py index 9710d896..9f5d9677 100644 --- a/examples/text2cypher_search.py +++ b/examples/text2cypher_search.py @@ -1,5 +1,5 @@ -from langchain_openai import OpenAI from neo4j import GraphDatabase +from neo4j_genai.llm import OpenAILLM from neo4j_genai.retrievers.text2cypher import Text2CypherRetriever URI = "neo4j://localhost:7687" @@ -9,7 +9,7 @@ driver = GraphDatabase.driver(URI, auth=AUTH) # Create LLM object -llm = OpenAI(model="gpt-3.5-turbo-instruct") +llm = OpenAILLM(model_name="gpt-3.5-turbo", model_params={"temperature": 0}) # (Optional) Specify your own Neo4j schema neo4j_schema = """ @@ -36,7 +36,7 @@ # Initialize the retriever retriever = Text2CypherRetriever( driver=driver, - llm=llm, # type: ignore + llm=llm, neo4j_schema=neo4j_schema, examples=examples, )