Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/server-ai-langchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ai-providers/server-ai-langchain

on:
push:
branches: [main, 'feat/**']
paths-ignore:
- '**.md' #Do not need to run CI for markdown changes.
pull_request:
branches: [main, 'feat/**']
paths-ignore:
- '**.md'

jobs:
build-test-langchain-provider:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
- id: shared
name: Shared CI Steps
uses: ./actions/ci
with:
workspace_name: '@launchdarkly/server-sdk-ai-langchain'
workspace_path: packages/ai-providers/server-ai-langchain
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ describe('LangChainProvider', () => {

expect(result.metrics.success).toBe(false);
expect(result.message.content).toBe('');
expect(mockLogger.warn).toHaveBeenCalledWith(
'Multimodal response not supported, expecting a string. Content type: object, Content:',
JSON.stringify({ type: 'image', data: 'base64data' }, null, 2),
);
expect(mockLogger.warn).toHaveBeenCalledTimes(1);
});

it('returns success=false for array content and logs warning', async () => {
Expand All @@ -156,10 +153,7 @@ describe('LangChainProvider', () => {

expect(result.metrics.success).toBe(false);
expect(result.message.content).toBe('');
expect(mockLogger.warn).toHaveBeenCalledWith(
'Multimodal response not supported, expecting a string. Content type: object, Content:',
JSON.stringify(['text', { type: 'image', data: 'base64data' }], null, 2),
);
expect(mockLogger.warn).toHaveBeenCalledTimes(1);
});
});

Expand Down
7 changes: 7 additions & 0 deletions packages/ai-providers/server-ai-langchain/tsconfig.ref.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"include": ["src/**/*"],
"compilerOptions": {
"composite": true
}
}
5 changes: 5 additions & 0 deletions packages/ai-providers/server-ai-langchain/typedoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": ["../../../typedoc.base.json"],
"entryPoints": ["src/index.ts"],
"out": "docs"
}
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,8 @@
{
"path": "./packages/sdk/combined-browser/tsconfig.ref.json"
},
{
"path": "./packages/ai-providers/server-ai-langchain/tsconfig.ref.json"
}
]
}