diff --git a/libs/langchain-openai/src/chat_models.ts b/libs/langchain-openai/src/chat_models.ts index 243518c41c2d..4c7bb9aedb45 100644 --- a/libs/langchain-openai/src/chat_models.ts +++ b/libs/langchain-openai/src/chat_models.ts @@ -233,6 +233,7 @@ function convertMessagesToOpenAIParams(messages: BaseMessage[]) { completionParam.tool_calls = message.tool_calls.map( convertLangChainToolCallToOpenAI ); + completionParam.content = null; } else { if (message.additional_kwargs.tool_calls != null) { completionParam.tool_calls = message.additional_kwargs.tool_calls; @@ -948,6 +949,7 @@ export class ChatOpenAI< const requestOptions = this._getClientOptions(options); return this.caller.call(async () => { try { + console.log(request.messages) const res = await this.client.chat.completions.create( request, requestOptions diff --git a/libs/langchain-openai/src/tests/chat_models.standard.int.test.ts b/libs/langchain-openai/src/tests/chat_models.standard.int.test.ts index 9c0c4e0d90d2..6eb91f093c4c 100644 --- a/libs/langchain-openai/src/tests/chat_models.standard.int.test.ts +++ b/libs/langchain-openai/src/tests/chat_models.standard.int.test.ts @@ -24,12 +24,6 @@ class ChatOpenAIStandardIntegrationTests extends ChatModelIntegrationTests< }); } - async testToolMessageHistoriesListContent() { - console.warn( - "ChatOpenAI testToolMessageHistoriesListContent test known failure. Skipping..." - ); - } - async testUsageMetadataStreaming() { // ChatOpenAI does not support streaming tokens by // default, so we must pass in a call option to