Skip to content

Commit 4983bc7

Browse files
committed
update readme
1 parent ef4b10b commit 4983bc7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/inference/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,10 @@ You can use any Chat Completion API-compatible provider with the `chatCompletion
651651
```typescript
652652
// Chat Completion Example
653653
const MISTRAL_KEY = process.env.MISTRAL_KEY;
654-
const hf = new InferenceClient(MISTRAL_KEY);
655-
const ep = hf.endpoint("https://api.mistral.ai");
656-
const stream = ep.chatCompletionStream({
654+
const hf = new InferenceClient(MISTRAL_KEY, {
655+
endpointUrl: "https://api.mistral.ai",
656+
});
657+
const stream = hf.chatCompletionStream({
657658
model: "mistral-tiny",
658659
messages: [{ role: "user", content: "Complete the equation one + one = , just the answer" }],
659660
});

0 commit comments

Comments
 (0)