Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/docs/modules/models/llms/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ npm install @huggingface/inference
```typescript
import { HuggingFaceInference } from "langchain/llms";

const model = new HuggingFaceInference({ model: "gpt2" });
const model = new HuggingFaceInference({ model: "gpt2", apiKey: "YOUR-API-KEY" });
const res = await model.call("1 + 1 =");
console.log({ res });
```
Expand All @@ -42,7 +42,7 @@ npm install cohere-ai
```typescript
import { Cohere } from "langchain/llms";

const model = new Cohere({ maxTokens: 20 });
const model = new Cohere({ maxTokens: 20, apiKey: "YOUR-API-KEY" });
const res = await model.call(
"What would be a good company name a company that makes colorful socks?"
);
Expand All @@ -61,6 +61,7 @@ import { Replicate } from "langchain/llms";
const model = new Replicate({
model:
"daanelson/flan-t5:04e422a9b85baed86a4f24981d7f9953e20c5fd82f6103b74ebc431588e1cec8",
apiKey: "YOUR-API-KEY"
});
const res = await modelA.call(
"What would be a good company name a company that makes colorful socks?"
Expand Down