Add docs and bump version since we changed python api again.

This commit is contained in:
Adam Treat 2023-07-14 09:43:18 -04:00 committed by AT
parent c77ab849c0
commit bb2b82e1b9
2 changed files with 8 additions and 2 deletions

View File

@ -16,9 +16,15 @@ from . import pyllmodel
DEFAULT_MODEL_DIRECTORY = os.path.join(str(Path.home()), ".cache", "gpt4all").replace("\\", "\\\\") DEFAULT_MODEL_DIRECTORY = os.path.join(str(Path.home()), ".cache", "gpt4all").replace("\\", "\\\\")
class Embed4All: class Embed4All:
"""
Python class that handles embeddings for GPT4All.
"""
def __init__( def __init__(
self self
): ):
"""
Constructor
"""
self.gpt4all = GPT4All(model_name='ggml-all-MiniLM-L6-v2-f16.bin') self.gpt4all = GPT4All(model_name='ggml-all-MiniLM-L6-v2-f16.bin')
def embed( def embed(
@ -26,7 +32,7 @@ class Embed4All:
text: str text: str
) -> list[float]: ) -> list[float]:
""" """
Generate an embedding for all GPT4All. Generate an embedding.
Args: Args:
text: The text document to generate an embedding for. text: The text document to generate an embedding for.

View File

@ -61,7 +61,7 @@ copy_prebuilt_C_lib(SRC_CLIB_DIRECtORY,
setup( setup(
name=package_name, name=package_name,
version="1.0.4", version="1.0.5",
description="Python bindings for GPT4All", description="Python bindings for GPT4All",
author="Richard Guo", author="Richard Guo",
author_email="richard@nomic.ai", author_email="richard@nomic.ai",