From f10845b5cddba32bfe67440287c4667653c86796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Gill=C3=A9?= Date: Thu, 25 Apr 2024 23:04:40 +0200 Subject: [PATCH] Revert "Merge pull request #68 from philippgille/stop-exporting-openai-baseurl" This reverts commit 04d0fd54985187325f215a65500cc4cb7d27dd90, reversing changes made to 6886041cdf237523e7960e75198006c159ab3c88. --- embed_openai.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embed_openai.go b/embed_openai.go index 3fe578c..1d09e01 100644 --- a/embed_openai.go +++ b/embed_openai.go @@ -12,7 +12,7 @@ import ( "sync" ) -const baseURLOpenAI = "https://api.openai.com/v1" +const BaseURLOpenAI = "https://api.openai.com/v1" type EmbeddingModelOpenAI string @@ -42,7 +42,7 @@ func NewEmbeddingFuncDefault() EmbeddingFunc { func NewEmbeddingFuncOpenAI(apiKey string, model EmbeddingModelOpenAI) EmbeddingFunc { // OpenAI embeddings are normalized normalized := true - return NewEmbeddingFuncOpenAICompat(baseURLOpenAI, apiKey, string(model), &normalized) + return NewEmbeddingFuncOpenAICompat(BaseURLOpenAI, apiKey, string(model), &normalized) } // NewEmbeddingFuncOpenAICompat returns a function that creates embeddings for a text