mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
docs switch guardrails on / off
This commit is contained in:
parent
b288835b47
commit
540db53ccb
1 changed files with 16 additions and 0 deletions
|
|
@ -58,6 +58,22 @@ curl --location 'http://localhost:4000/chat/completions' \
|
|||
👉 Pass `"metadata": {"guardrails": []}`
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="js" label="Langchain JS">
|
||||
|
||||
```js
|
||||
const model = new ChatOpenAI({
|
||||
modelName: "llama3",
|
||||
openAIApiKey: "sk-1234",
|
||||
modelKwargs: {"metadata": {"guardrails": []}}
|
||||
}, {
|
||||
basePath: "http://0.0.0.0:4000",
|
||||
});
|
||||
|
||||
const message = await model.invoke("Hi there!");
|
||||
console.log(message);
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="curl" label="Curl">
|
||||
|
||||
```shell
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue