Skip to content

Commit

Permalink
bump version and change openai default model
Browse files Browse the repository at this point in the history
  • Loading branch information
acatav committed Feb 1, 2024
1 parent 0f50445 commit a2b396a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ encoder.encode_queries(["Who jumped over the lazy dog?"])

When using the `OpenAIEncoder`, you need to provide an API key for the OpenAI API, and store it in the `OPENAI_API_KEY` environment variable before you import the encoder.

By default the encoder will use `text-embedding-ada-002` as recommended by OpenAI. You can also specify a different model name using the `model_name` parameter.
By default the encoder will use `text-embedding-3-small` as recommended by OpenAI. You can also specify a different model name using the `model_name` parameter.
#### Usage
```python
from pinecone_text.dense import OpenAIEncoder

encoder = OpenAIEncoder() # defaults to the recommended model - "text-embedding-ada-002"
encoder = OpenAIEncoder() # defaults to the recommended model - "text-embedding-3-small"

encoder.encode_documents(["The quick brown fox jumps over the lazy dog"])
# [[0.21, 0.38, 0.15, ...]]
Expand All @@ -186,7 +186,7 @@ By default the encoder will use `jina-embeddings-v2-base-en`. You can also speci
```python
from pinecone_text.dense import JinaEncoder

encoder = JinaEncoder() # defaults to the recommended model - "text-embedding-ada-002"
encoder = JinaEncoder()

encoder.encode_documents(["The quick brown fox jumps over the lazy dog"])
# [[-0.62586284, -0.54578537, 0.5570845, ...]]
Expand Down
2 changes: 1 addition & 1 deletion pinecone_text/dense/openai_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class OpenAIEncoder(BaseDenseEncoder):

def __init__(
self,
model_name: str = "text-embedding-ada-002",
model_name: str = "text-embedding-3-small",
*,
dimension: Optional[int] = None,
**kwargs: Any,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pinecone-text"
version = "0.7.2"
version = "0.8.0"
description = "Text utilities library by Pinecone.io"
authors = ["Pinecone.io"]
readme = "README.md"
Expand Down

0 comments on commit a2b396a

Please sign in to comment.