mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-26 07:23:38 +00:00
Add docs and bump version since we changed python api again.
This commit is contained in:
parent
c77ab849c0
commit
bb2b82e1b9
@ -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.
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user