Skip to content

Commit

Permalink
chore: lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jun 27, 2024
1 parent 7ceef7d commit 0ed8583
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/core_docs/docs/integrations/chat/bedrock.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_label: Bedrock
## Setup

:::tip
The `ChatBedrockConverse` chat model is now available via `@langchain/aws`. Access tool calling with more models with this package.
The `ChatBedrockConverse` chat model is now available via `@langchain/aws`. Access tool calling with more models with this package.
:::

You'll need to install the `@langchain/community` package:
Expand Down
20 changes: 11 additions & 9 deletions examples/src/models/chat/integration_bedrock_tools_converse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ const model = new ChatBedrockConverse({
},
});

const weatherTool = tool(({ city, state }) => `The weather in ${city}, ${state} is 72°F and sunny`, {
name: "weather_tool",
description: "Get the weather for a city",
schema: z
.object({
city: z.string().describe("The city to get the weather for"),
state: z.string().describe("The state to get the weather for").optional(),
})
});
const weatherTool = tool(
({ city, state }) => `The weather in ${city}, ${state} is 72°F and sunny`,
{
name: "weather_tool",
description: "Get the weather for a city",
schema: z.object({
city: z.string().describe("The city to get the weather for"),
state: z.string().describe("The state to get the weather for").optional(),
}),
}
);

const modelWithTools = model.bindTools([weatherTool]);
// Optionally, you can bind tools via the `.bind` method:
Expand Down
4 changes: 2 additions & 2 deletions libs/langchain-aws/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export interface ChatBedrockConverseCallOptions

/**
* Integration with AWS Bedrock Converse API.
*
*
* @example
* ```typescript
* import { ChatBedrockConverse } from "@langchain/aws";
Expand All @@ -165,7 +165,7 @@ export interface ChatBedrockConverseCallOptions
* accessKeyId: process.env.BEDROCK_AWS_ACCESS_KEY_ID!,
* },
* });
*
*
* const res = await model.invoke([new HumanMessage("Print hello world")]);
* ```
*/
Expand Down

0 comments on commit 0ed8583

Please sign in to comment.