Skip to content

Commit

Permalink
Adding VoyageAI's text_embedding to 'integrations/text_embedding/'
Browse files Browse the repository at this point in the history
  • Loading branch information
fzowl committed Dec 19, 2024
1 parent a9782e1 commit d3e02ed
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/src/theme/EmbeddingTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ export default function EmbeddingTabs(props) {
hideNomic,
nvidiaParams,
hideNvidia,
voyageaiParams,
hideVoyageai,
fakeEmbeddingParams,
hideFakeEmbedding,
customVarName,
} = props;

const openAIParamsOrDefault = openaiParams ?? `model="text-embedding-3-large"`;
const azureParamsOrDefault =
azureOpenaiParams ??
Expand All @@ -42,10 +44,11 @@ export default function EmbeddingTabs(props) {
const mistralParamsOrDefault = mistralParams ?? `model="mistral-embed"`;
const nomicsParamsOrDefault = nomicParams ?? `model="nomic-embed-text-v1.5"`;
const nvidiaParamsOrDefault = nvidiaParams ?? `model="NV-Embed-QA"`;
const voyageaiParamsOrDefault = voyageaiParams ?? `model="voyage-3"`;
const fakeEmbeddingParamsOrDefault = fakeEmbeddingParams ?? `size=4096`;

const embeddingVarName = customVarName ?? "embeddings";

const tabItems = [
{
value: "OpenAI",
Expand Down Expand Up @@ -137,6 +140,15 @@ export default function EmbeddingTabs(props) {
default: false,
shouldHide: hideNvidia,
},
{
value: "Voyage AI",
label: "Voyage AI",
text: `from langchain-voyageai import VoyageAIEmbeddings\n\n${embeddingVarName} = VoyageAIEmbeddings(${voyageaiParamsOrDefault})`,
apiKeyName: "VOYAGE_API_KEY",
packageName: "langchain-voyageai",
default: false,
shouldHide: hideVoyageai,
},
{
value: "Fake",
label: "Fake",
Expand Down

0 comments on commit d3e02ed

Please sign in to comment.