Skip to content

Commit

Permalink
Merge pull request #68 from philippgille/stop-exporting-openai-baseurl
Browse files Browse the repository at this point in the history
Stop exporting OpenAI base URL
  • Loading branch information
philippgille authored Apr 24, 2024
2 parents 6886041 + 7c900a2 commit 04d0fd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions embed_openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sync"
)

const BaseURLOpenAI = "https://api.openai.com/v1"
const baseURLOpenAI = "https://api.openai.com/v1"

type EmbeddingModelOpenAI string

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 04d0fd5

Please sign in to comment.