-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c6814c
commit 841ca57
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from groq import Groq | ||
|
||
client = Groq() | ||
|
||
embedding = client.embeddings.create( | ||
# | ||
# Required parameters | ||
# | ||
# The input texts to embed. | ||
input=["hello world"], | ||
# The model to use. | ||
model="nomic-embed-text-v1.5", | ||
# | ||
# Optional parameters | ||
# | ||
# Format to return the embeddings in. | ||
# Only "float" is supported at the moment. | ||
encoding_format="float", | ||
# A unique identifier representing your end-user. | ||
user="user", | ||
) | ||
|
||
print(embedding) |