Skip to content

Commit

Permalink
chore: lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Dec 20, 2023
1 parent 3f9afdb commit 8892303
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/langchain-community/src/embeddings/togetherai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class TogetherAIEmbeddings
constructor(fields?: Partial<TogetherAIEmbeddingsParams>) {
super(fields ?? {});

let apiKey =
const apiKey =
fields?.apiKey ?? getEnvironmentVariable("TOGETHER_AI_API_KEY");
if (!apiKey) {
throw new Error("TOGETHER_AI_API_KEY not found.");
Expand All @@ -101,14 +101,14 @@ export class TogetherAIEmbeddings
return {
accept: "application/json",
"content-type": "application/json",
Authorization: `Bearer ${this.apiKey}`
Authorization: `Bearer ${this.apiKey}`,
};
}

private constructBody(input: string) {
const body = {
model: this?.modelName,
input
input,
};
return body;
}
Expand Down Expand Up @@ -170,7 +170,7 @@ export class TogetherAIEmbeddings
const fetchResponse = await fetch(this.embeddingsAPIUrl, {
method: "POST",
headers,
body
body,
});

if (fetchResponse.status === 200) {
Expand Down

0 comments on commit 8892303

Please sign in to comment.