-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
641690d
commit 4d186b9
Showing
6 changed files
with
169 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
libs/langchain-ollama/src/tests/chat_models.standard.int.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable no-process-env */ | ||
import { test, expect } from "@jest/globals"; | ||
import { ChatModelIntegrationTests } from "@langchain/standard-tests"; | ||
import { AIMessageChunk } from "@langchain/core/messages"; | ||
import { ChatOllama, ChatOllamaCallOptions } from "../chat_models.js"; | ||
|
||
class ChatOllamaStandardIntegrationTests extends ChatModelIntegrationTests< | ||
ChatOllamaCallOptions, | ||
AIMessageChunk | ||
> { | ||
constructor() { | ||
super({ | ||
Cls: ChatOllama, | ||
chatModelHasToolCalling: false, | ||
chatModelHasStructuredOutput: false, | ||
constructorArgs: {}, | ||
}); | ||
} | ||
} | ||
|
||
const testClass = new ChatOllamaStandardIntegrationTests(); | ||
|
||
test("ChatOllamaStandardIntegrationTests", async () => { | ||
const testResults = await testClass.runTests(); | ||
expect(testResults).toBe(true); | ||
}); |
34 changes: 34 additions & 0 deletions
34
libs/langchain-ollama/src/tests/chat_models.standard.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* eslint-disable no-process-env */ | ||
import { test, expect } from "@jest/globals"; | ||
import { ChatModelUnitTests } from "@langchain/standard-tests"; | ||
import { AIMessageChunk } from "@langchain/core/messages"; | ||
import { ChatOllama, ChatOllamaCallOptions } from "../chat_models.js"; | ||
|
||
class ChatOllamaStandardUnitTests extends ChatModelUnitTests< | ||
ChatOllamaCallOptions, | ||
AIMessageChunk | ||
> { | ||
constructor() { | ||
super({ | ||
Cls: ChatOllama, | ||
chatModelHasToolCalling: false, | ||
chatModelHasStructuredOutput: false, | ||
constructorArgs: {}, | ||
}); | ||
} | ||
|
||
testChatModelInitApiKey() { | ||
this.skipTestMessage( | ||
"testChatModelInitApiKey", | ||
"ChatOllama", | ||
"API key is not required for ChatOllama" | ||
); | ||
} | ||
} | ||
|
||
const testClass = new ChatOllamaStandardUnitTests(); | ||
|
||
test("ChatOllamaStandardUnitTests", () => { | ||
const testResults = testClass.runTests(); | ||
expect(testResults).toBe(true); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters