Skip to content

Commit

Permalink
add docstrings to openai encoder init
Browse files Browse the repository at this point in the history
  • Loading branch information
acatav committed Nov 12, 2023
1 parent acdf505 commit 3c91397
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pinecone_text/dense/openai_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ class OpenAIEncoder(BaseDenseEncoder):
"""

def __init__(self, model_name: str = "text-embedding-ada-002", **kwargs: Any):
"""
Initialize the OpenAI encoder.
:param model_name: The name of the embedding model to use. See https://beta.openai.com/docs/api-reference/embeddings
:param kwargs: Additional arguments to pass to the underlying openai client. See https://github.com/openai/openai-python
"""
if not _openai_installed:
raise ImportError(
"Failed to import openai. Make sure you install openai extra "
Expand Down

0 comments on commit 3c91397

Please sign in to comment.