Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexthomas93 committed Sep 19, 2024
1 parent f7f2451 commit 4de857c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
9 changes: 7 additions & 2 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,16 @@ LLMInterface


OpenAILLM
---------
=========

.. autoclass:: neo4j_graphrag.llm.OpenAILLM
:members:

VertexAILLM
===========

.. autoclass:: neo4j_graphrag.llm.vertexai.VertexAILLM
:members:

PromptTemplate
==============
Expand Down Expand Up @@ -389,4 +394,4 @@ PipelineStatusUpdateError
=========================

.. autoclass:: neo4j_graphrag.experimental.pipeline.exceptions.PipelineStatusUpdateError
:show-inheritance:
:show-inheritance:
2 changes: 1 addition & 1 deletion src/neo4j_graphrag/llm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
from .openai_llm import OpenAILLM
from .types import LLMResponse

__all__ = ["LLMResponse", "LLMInterface", "OpenAILLM"]
__all__ = ["LLMResponse", "LLMInterface", "OpenAILLM", "VertexAILLM"]
13 changes: 13 additions & 0 deletions src/neo4j_graphrag/llm/vertexai.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ class VertexAILLM(LLMInterface):
Raises:
LLMGenerationError: If there's an error generating the response from the model.
Example:
.. code-block:: python
from neo4j_graphrag.llm import VertexAILLM
from vertexai.generative_models import GenerationConfig
generation_config = GenerationConfig(temperature=0.0)
llm = VertexAILLM(
model_name="gemini-1.5-flash-001", generation_config=generation_config
)
llm.invoke("Who is the mother of Paul Atreides?")
"""

def __init__(
Expand Down

0 comments on commit 4de857c

Please sign in to comment.