Skip to content

Commit

Permalink
Merge pull request #3201 from langchain-ai/release
Browse files Browse the repository at this point in the history
Release 0.0.184
  • Loading branch information
jacoblee93 committed Nov 8, 2023
2 parents 42e6ee6 + ab653c3 commit c110aee
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion langchain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langchain",
"version": "0.0.183",
"version": "0.0.184",
"description": "Typescript bindings for langchain",
"type": "module",
"engines": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable no-process-env */
/* eslint-disable @typescript-eslint/no-non-null-assertion */

import { z } from "zod";
import { OpenAI as OpenAIClient } from "openai";
import { AgentExecutor } from "../../../agents/executor.js";
Expand Down Expand Up @@ -64,7 +67,7 @@ class HumanReadableChecker extends StructuredTool {
}
}

test("OpenAIAssistantRunnable can be passed as an agent", async () => {
test.skip("New OpenAIAssistantRunnable can be passed as an agent", async () => {
const tools = [new WeatherTool(), new HumanReadableChecker()];
const agent = await OpenAIAssistantRunnable.createAssistant({
model: "gpt-3.5-turbo-1106",
Expand All @@ -90,7 +93,29 @@ test("OpenAIAssistantRunnable can be passed as an agent", async () => {
*/
});

test("OpenAIAssistantRunnable is invokeable", async () => {
test("OpenAIAssistantRunnable can be passed as an agent", async () => {
const tools = [new WeatherTool(), new HumanReadableChecker()];
const agent = new OpenAIAssistantRunnable({
assistantId: process.env.TEST_OPENAI_ASSISTANT_ID!,
asAgent: true,
});
const agentExecutor = AgentExecutor.fromAgentAndTools({
agent,
tools,
});
const assistantResponse = await agentExecutor.invoke({
content:
"What's the weather in San Francisco and Tokyo? And will it be warm or cold in those places?",
});
console.log(assistantResponse);
/**
{
output: "The weather in San Francisco, CA is currently 72°F and it's warm. In Tokyo, Japan, the temperature is 10°C and it's also warm."
}
*/
});

test.skip("Created OpenAIAssistantRunnable is invokeable", async () => {
const assistant = await OpenAIAssistantRunnable.createAssistant({
model: "gpt-4",
instructions:
Expand Down

0 comments on commit c110aee

Please sign in to comment.