Skip to content

Commit 19fbace

Browse files
authored
Changed model in t2c examples to gpt-3.5-turbo-0125 (neo4j#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
1 parent c284b08 commit 19fbace

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/source/user_guide_rag.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ LLMs can be different.
616616
driver = GraphDatabase.driver(URI, auth=AUTH)
617617
618618
# Create LLM object
619-
llm = OpenAILLM(model_name="gpt-3.5-turbo-instruct")
619+
llm = OpenAILLM(model_name="gpt-3.5-turbo")
620620
621621
# (Optional) Specify your own Neo4j schema
622622
neo4j_schema = """

examples/text2cypher_search.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from langchain_openai import OpenAI
21
from neo4j import GraphDatabase
2+
from neo4j_genai.llm import OpenAILLM
33
from neo4j_genai.retrievers.text2cypher import Text2CypherRetriever
44

55
URI = "neo4j://localhost:7687"
@@ -9,7 +9,7 @@
99
driver = GraphDatabase.driver(URI, auth=AUTH)
1010

1111
# Create LLM object
12-
llm = OpenAI(model="gpt-3.5-turbo-instruct")
12+
llm = OpenAILLM(model_name="gpt-3.5-turbo", model_params={"temperature": 0})
1313

1414
# (Optional) Specify your own Neo4j schema
1515
neo4j_schema = """
@@ -36,7 +36,7 @@
3636
# Initialize the retriever
3737
retriever = Text2CypherRetriever(
3838
driver=driver,
39-
llm=llm, # type: ignore
39+
llm=llm,
4040
neo4j_schema=neo4j_schema,
4141
examples=examples,
4242
)

0 commit comments

Comments
 (0)