Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jan 18, 2024
1 parent cff707b commit c1e4e74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions langgraph/src/prebuilt/tool_executor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
RunnableBinding,
RunnableConfig,
RunnableLambda
RunnableLambda,
} from "@langchain/core/runnables";
import { Tool } from "@langchain/core/tools";

Expand Down Expand Up @@ -44,17 +44,17 @@ export class ToolExecutor extends RunnableBinding<
constructor(fields: ToolExecutorArgs) {
const fieldsWithDefaults = {
invalidToolMsgTemplate: INVALID_TOOL_MSG_TEMPLATE,
...fields
...fields,
};
const bound = new RunnableLambda({
func: async (
input: ToolInvocationInterface,
options?: { config?: RunnableConfig }
) => this._execute(input, options?.config)
) => this._execute(input, options?.config),
});
super({
bound,
config: {}
config: {},
});
this.tools = fieldsWithDefaults.tools;
this.invalidToolMsgTemplate = fieldsWithDefaults.invalidToolMsgTemplate;
Expand Down
6 changes: 2 additions & 4 deletions langgraph/src/readme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ import { ToolExecutor } from "./prebuilt/tool_executor.js";
const tools: Tool[] = [new TavilySearchResults({ maxResults: 1 })];

const toolExecutor = new ToolExecutor({

Check warning on line 8 in langgraph/src/readme.ts

View workflow job for this annotation

GitHub Actions / Check linting

'toolExecutor' is assigned a value but never used
tools
tools,
});

// We will set streaming=True so that we can stream tokens
// See the streaming section for more information on this.
const model = new ChatOpenAI({

Check warning on line 14 in langgraph/src/readme.ts

View workflow job for this annotation

GitHub Actions / Check linting

'model' is assigned a value but never used
temperature: 0,
streaming: true
streaming: true,
});


0 comments on commit c1e4e74

Please sign in to comment.