File tree Expand file tree Collapse file tree
dev-packages/browser-integration-tests/suites/tracing/ai-providers/langchain Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Mock LangChain Chat Model for browser testing
2- export class MockChatModel {
2+ export class MockChatAnthropic {
33 constructor ( params ) {
44 this . _model = params . model ;
55 this . _temperature = params . temperature ;
@@ -46,7 +46,7 @@ export class MockChatModel {
4646 generations : [
4747 [
4848 {
49- text : 'Mock response from LangChain !' ,
49+ text : 'Mock response from Anthropic !' ,
5050 generationInfo : {
5151 finish_reason : 'stop' ,
5252 } ,
Original file line number Diff line number Diff line change 11import { createLangChainCallbackHandler } from '@sentry/browser' ;
2- import { MockChatModel } from './mocks.js' ;
2+ import { MockChatAnthropic } from './mocks.js' ;
33
44const callbackHandler = createLangChainCallbackHandler ( {
55 recordInputs : false ,
66 recordOutputs : false ,
77} ) ;
88
9- const chatModel = new MockChatModel ( {
9+ const chatModel = new MockChatAnthropic ( {
1010 model : 'claude-3-haiku-20240307' ,
1111 temperature : 0.7 ,
1212 maxTokens : 100 ,
You can’t perform that action at this time.
0 commit comments