From 71e7b2f49453c20ab4f2779ba01400deac77c220 Mon Sep 17 00:00:00 2001 From: HEISENBERG Date: Thu, 27 Jun 2024 01:37:05 +0530 Subject: [PATCH] Openai Supported AI Providers --- embeddings.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embeddings.go b/embeddings.go index b513ba6a..162088b8 100644 --- a/embeddings.go +++ b/embeddings.go @@ -155,7 +155,7 @@ const ( type EmbeddingRequest struct { Input any `json:"input"` Model EmbeddingModel `json:"model"` - User string `json:"user"` + User string `json:"user,omitempty"` EncodingFormat EmbeddingEncodingFormat `json:"encoding_format,omitempty"` // Dimensions The number of dimensions the resulting output embeddings should have. // Only supported in text-embedding-3 and later models. @@ -179,7 +179,7 @@ type EmbeddingRequestStrings struct { // or see our Model overview for descriptions of them. Model EmbeddingModel `json:"model"` // A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. - User string `json:"user"` + User string `json:"user,omitempty"` // EmbeddingEncodingFormat is the format of the embeddings data. // Currently, only "float" and "base64" are supported, however, "base64" is not officially documented. // If not specified OpenAI will use "float". @@ -211,7 +211,7 @@ type EmbeddingRequestTokens struct { // or see our Model overview for descriptions of them. Model EmbeddingModel `json:"model"` // A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. - User string `json:"user"` + User string `json:"user,omitempty"` // EmbeddingEncodingFormat is the format of the embeddings data. // Currently, only "float" and "base64" are supported, however, "base64" is not officially documented. // If not specified OpenAI will use "float".