Skip to content

Commit

Permalink
Updated docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexthomas93 committed Sep 18, 2024
1 parent cedfbf5 commit a305d43
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
8 changes: 7 additions & 1 deletion src/neo4j_graphrag/llm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@


class LLMInterface(ABC):
"""Interface for large language models."""
"""Interface for large language models.
Args:
model_name (str): The name of the language model.
model_params (Optional[dict], optional): Additional parameters passed to the model when text is sent to it. Defaults to None.
**kwargs (Any): Arguments passed to the model when for the class is initialised. Defaults to None.
"""

def __init__(
self,
Expand Down
3 changes: 1 addition & 2 deletions src/neo4j_graphrag/llm/openai_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ def __init__(
Args:
model_name (str):
model_params (str): Parameters like temperature and such that will be
passed to the model
model_params (str): Parameters like temperature that will be passed to the model when text is sent to it
kwargs: All other parameters will be passed to the openai.OpenAI init.
"""
Expand Down
6 changes: 5 additions & 1 deletion src/neo4j_graphrag/llm/vertexai.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ class VertexAILLM(LLMInterface):
Args:
model_name (str, optional): Name of the LLM to use. Defaults to "gemini-1.5-flash-001".
model_params (Optional[Dict[str, Any]], optional): Parameters for passed to the LLM's invoke and ainvoke functions.
model_params (Optional[dict], optional): Additional parameters passed to the model when text is sent to it. Defaults to None.
**kwargs (Any): Arguments passed to the model when for the class is initialised. Defaults to None.
Raises:
LLMGenerationError: If there's an error generating the response from the model.
"""

def __init__(
Expand Down

0 comments on commit a305d43

Please sign in to comment.