@n8n/n8n-nodes-langchain 1.59.1 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/known/credentials.json +1 -4
- package/dist/known/nodes.json +0 -12
- package/dist/nodes/agents/Agent/Agent.node.js +2 -1
- package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +10 -0
- package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js +2 -2
- package/dist/nodes/embeddings/EmbeddingsAwsBedrock/EmbeddingsAwsBedrock.node.js.map +1 -1
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +18 -0
- package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.d.ts +0 -3
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js +2 -5
- package/dist/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.js.map +1 -1
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +34 -2
- package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js +9 -4
- package/dist/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.js.map +1 -1
- package/dist/nodes/llms/N8nLlmTracing.js +2 -2
- package/dist/nodes/llms/N8nLlmTracing.js.map +1 -1
- package/dist/nodes/tools/ToolHttpRequest/utils.d.ts +1 -1
- package/dist/nodes/tools/ToolHttpRequest/utils.js +5 -5
- package/dist/nodes/tools/ToolHttpRequest/utils.js.map +1 -1
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js +3 -3
- package/dist/nodes/vector_store/shared/createVectorStoreNode.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/actions/router.js +8 -0
- package/dist/nodes/vendors/OpenAi/actions/router.js.map +1 -1
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.d.ts +3 -0
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.js +16 -0
- package/dist/nodes/vendors/OpenAi/helpers/error-handling.js.map +1 -0
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js +1 -1
- package/dist/nodes/vendors/OpenAi/methods/listSearch.js.map +1 -1
- package/dist/types/nodes.json +3 -6
- package/dist/utils/helpers.d.ts +2 -2
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/logWrapper.js +11 -11
- package/dist/utils/logWrapper.js.map +1 -1
- package/package.json +33 -37
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.d.ts +0 -5
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js +0 -123
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/EmbeddingsGooglePalm.node.js.map +0 -1
- package/dist/nodes/embeddings/EmbeddingsGooglePalm/google.svg +0 -1
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.d.ts +0 -5
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js +0 -159
- package/dist/nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.js.map +0 -1
- package/dist/nodes/llms/LmChatGooglePalm/google.svg +0 -1
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.d.ts +0 -5
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js +0 -166
- package/dist/nodes/llms/LmGooglePalm/LmGooglePalm.node.js.map +0 -1
- package/dist/nodes/llms/LmGooglePalm/google.svg +0 -1
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LmChatGooglePalm = void 0;
|
|
4
|
-
const googlepalm_1 = require("@langchain/community/chat_models/googlepalm");
|
|
5
|
-
const N8nLlmTracing_1 = require("../N8nLlmTracing");
|
|
6
|
-
class LmChatGooglePalm {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.description = {
|
|
9
|
-
displayName: 'Google PaLM Chat Model',
|
|
10
|
-
name: 'lmChatGooglePalm',
|
|
11
|
-
icon: 'file:google.svg',
|
|
12
|
-
hidden: true,
|
|
13
|
-
group: ['transform'],
|
|
14
|
-
version: 1,
|
|
15
|
-
description: 'Chat Model Google PaLM',
|
|
16
|
-
defaults: {
|
|
17
|
-
name: 'Google PaLM Chat Model',
|
|
18
|
-
},
|
|
19
|
-
codex: {
|
|
20
|
-
categories: ['AI'],
|
|
21
|
-
subcategories: {
|
|
22
|
-
AI: ['Language Models', 'Root Nodes'],
|
|
23
|
-
'Language Models': ['Chat Models (Recommended)'],
|
|
24
|
-
},
|
|
25
|
-
resources: {
|
|
26
|
-
primaryDocumentation: [
|
|
27
|
-
{
|
|
28
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglepalm/',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
inputs: [],
|
|
34
|
-
outputs: ["ai_languageModel"],
|
|
35
|
-
outputNames: ['Model'],
|
|
36
|
-
credentials: [
|
|
37
|
-
{
|
|
38
|
-
name: 'googlePalmApi',
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
requestDefaults: {
|
|
43
|
-
ignoreHttpStatusErrors: true,
|
|
44
|
-
baseURL: '={{ $credentials.host }}',
|
|
45
|
-
},
|
|
46
|
-
properties: [
|
|
47
|
-
{
|
|
48
|
-
displayName: "Google PaLM API is <a href='https://ai.google.dev/palm_docs/deprecation' target='_blank'>deprecated</a>. Please use Google Vertex or Google Gemini nodes instead.",
|
|
49
|
-
name: 'deprecated',
|
|
50
|
-
type: 'notice',
|
|
51
|
-
default: '',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
displayName: 'Model',
|
|
55
|
-
name: 'modelName',
|
|
56
|
-
type: 'options',
|
|
57
|
-
description: 'The model which will generate the completion. <a href="https://developers.generativeai.google/api/rest/generativelanguage/models/list">Learn more</a>.',
|
|
58
|
-
typeOptions: {
|
|
59
|
-
loadOptions: {
|
|
60
|
-
routing: {
|
|
61
|
-
request: {
|
|
62
|
-
method: 'GET',
|
|
63
|
-
url: '/v1beta3/models',
|
|
64
|
-
},
|
|
65
|
-
output: {
|
|
66
|
-
postReceive: [
|
|
67
|
-
{
|
|
68
|
-
type: 'rootProperty',
|
|
69
|
-
properties: {
|
|
70
|
-
property: 'models',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
type: 'filter',
|
|
75
|
-
properties: {
|
|
76
|
-
pass: "={{ $responseItem.name.startsWith('models/chat') }}",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: 'setKeyValue',
|
|
81
|
-
properties: {
|
|
82
|
-
name: '={{$responseItem.name}}',
|
|
83
|
-
value: '={{$responseItem.name}}',
|
|
84
|
-
description: '={{$responseItem.description}}',
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: 'sort',
|
|
89
|
-
properties: {
|
|
90
|
-
key: 'name',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
routing: {
|
|
99
|
-
send: {
|
|
100
|
-
type: 'body',
|
|
101
|
-
property: 'model',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
default: 'models/chat-bison-001',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
displayName: 'Options',
|
|
108
|
-
name: 'options',
|
|
109
|
-
placeholder: 'Add Option',
|
|
110
|
-
description: 'Additional options to add',
|
|
111
|
-
type: 'collection',
|
|
112
|
-
default: {},
|
|
113
|
-
options: [
|
|
114
|
-
{
|
|
115
|
-
displayName: 'Sampling Temperature',
|
|
116
|
-
name: 'temperature',
|
|
117
|
-
default: 0.7,
|
|
118
|
-
typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
|
|
119
|
-
description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
|
|
120
|
-
type: 'number',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
displayName: 'Top K',
|
|
124
|
-
name: 'topK',
|
|
125
|
-
default: 40,
|
|
126
|
-
typeOptions: { maxValue: 1, minValue: -1, numberPrecision: 1 },
|
|
127
|
-
description: 'Used to remove "long tail" low probability responses. Defaults to -1, which disables it.',
|
|
128
|
-
type: 'number',
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
displayName: 'Top P',
|
|
132
|
-
name: 'topP',
|
|
133
|
-
default: 0.9,
|
|
134
|
-
typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
|
|
135
|
-
description: 'Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.',
|
|
136
|
-
type: 'number',
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
},
|
|
140
|
-
],
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
async supplyData(itemIndex) {
|
|
144
|
-
const credentials = await this.getCredentials('googlePalmApi');
|
|
145
|
-
const modelName = this.getNodeParameter('modelName', itemIndex);
|
|
146
|
-
const options = this.getNodeParameter('options', itemIndex, {});
|
|
147
|
-
const model = new googlepalm_1.ChatGooglePaLM({
|
|
148
|
-
apiKey: credentials.apiKey,
|
|
149
|
-
modelName,
|
|
150
|
-
...options,
|
|
151
|
-
callbacks: [new N8nLlmTracing_1.N8nLlmTracing(this)],
|
|
152
|
-
});
|
|
153
|
-
return {
|
|
154
|
-
response: model,
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
exports.LmChatGooglePalm = LmChatGooglePalm;
|
|
159
|
-
//# sourceMappingURL=LmChatGooglePalm.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LmChatGooglePalm.node.js","sourceRoot":"","sources":["../../../../nodes/llms/LmChatGooglePalm/LmChatGooglePalm.node.ts"],"names":[],"mappings":";;;AAQA,4EAA6E;AAC7E,oDAAiD;AAEjD,MAAa,gBAAgB;IAA7B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,wBAAwB;YAErC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,wBAAwB;YACrC,QAAQ,EAAE;gBACT,IAAI,EAAE,wBAAwB;aAC9B;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAAC;oBACrC,iBAAiB,EAAE,CAAC,2BAA2B,CAAC;iBAChD;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,wGAAwG;yBAC7G;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,oBAAoC;YAC7C,WAAW,EAAE,CAAC,OAAO,CAAC;YACtB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,sBAAsB,EAAE,IAAI;gBAC5B,OAAO,EAAE,0BAA0B;aACnC;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EACV,mKAAmK;oBACpK,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,QAAQ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link="http://www.w3.org/1999/xlink" viewBox="0 0 48 48"><defs><path id="a" d="M44.5 20H24v8.5h11.8C34.7 33.9 30.1 37 24 37c-7.2 0-13-5.8-13-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path fill="#FBBC05" d="M0 37V11l17 13z" clip-path="url(#b)"/><path fill="#EA4335" d="m0 11 17 13 7-6.1L48 14V0H0z" clip-path="url(#b)"/><path fill="#34A853" d="m0 37 30-23 7.9 1L48 0v48H0z" clip-path="url(#b)"/><path fill="#4285F4" d="M48 48 17 24l-4-3 35-10z" clip-path="url(#b)"/></svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
|
|
2
|
-
export declare class LmGooglePalm implements INodeType {
|
|
3
|
-
description: INodeTypeDescription;
|
|
4
|
-
supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
|
|
5
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LmGooglePalm = void 0;
|
|
4
|
-
const googlepalm_1 = require("@langchain/community/llms/googlepalm");
|
|
5
|
-
const N8nLlmTracing_1 = require("../N8nLlmTracing");
|
|
6
|
-
class LmGooglePalm {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.description = {
|
|
9
|
-
displayName: 'Google PaLM Language Model',
|
|
10
|
-
name: 'lmGooglePalm',
|
|
11
|
-
hidden: true,
|
|
12
|
-
icon: 'file:google.svg',
|
|
13
|
-
group: ['transform'],
|
|
14
|
-
version: 1,
|
|
15
|
-
description: 'Language Model Google PaLM',
|
|
16
|
-
defaults: {
|
|
17
|
-
name: 'Google PaLM Language Model',
|
|
18
|
-
},
|
|
19
|
-
codex: {
|
|
20
|
-
categories: ['AI'],
|
|
21
|
-
subcategories: {
|
|
22
|
-
AI: ['Language Models', 'Root Nodes'],
|
|
23
|
-
'Language Models': ['Text Completion Models'],
|
|
24
|
-
},
|
|
25
|
-
resources: {
|
|
26
|
-
primaryDocumentation: [
|
|
27
|
-
{
|
|
28
|
-
url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmgooglepalm/',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
inputs: [],
|
|
34
|
-
outputs: ["ai_languageModel"],
|
|
35
|
-
outputNames: ['Model'],
|
|
36
|
-
credentials: [
|
|
37
|
-
{
|
|
38
|
-
name: 'googlePalmApi',
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
requestDefaults: {
|
|
43
|
-
ignoreHttpStatusErrors: true,
|
|
44
|
-
baseURL: '={{ $credentials.host }}',
|
|
45
|
-
},
|
|
46
|
-
properties: [
|
|
47
|
-
{
|
|
48
|
-
displayName: "Google PaLM API is <a href='https://ai.google.dev/palm_docs/deprecation' target='_blank'>deprecated</a>. Please use Google Vertex or Google Gemini nodes instead.",
|
|
49
|
-
name: 'deprecated',
|
|
50
|
-
type: 'notice',
|
|
51
|
-
default: '',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
displayName: 'Model',
|
|
55
|
-
name: 'modelName',
|
|
56
|
-
type: 'options',
|
|
57
|
-
description: 'The model which will generate the completion. <a href="https://developers.generativeai.google/api/rest/generativelanguage/models/list">Learn more</a>.',
|
|
58
|
-
typeOptions: {
|
|
59
|
-
loadOptions: {
|
|
60
|
-
routing: {
|
|
61
|
-
request: {
|
|
62
|
-
method: 'GET',
|
|
63
|
-
url: '/v1beta3/models',
|
|
64
|
-
},
|
|
65
|
-
output: {
|
|
66
|
-
postReceive: [
|
|
67
|
-
{
|
|
68
|
-
type: 'rootProperty',
|
|
69
|
-
properties: {
|
|
70
|
-
property: 'models',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
type: 'filter',
|
|
75
|
-
properties: {
|
|
76
|
-
pass: "={{ $responseItem.name.startsWith('models/text') }}",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: 'setKeyValue',
|
|
81
|
-
properties: {
|
|
82
|
-
name: '={{$responseItem.name}}',
|
|
83
|
-
value: '={{$responseItem.name}}',
|
|
84
|
-
description: '={{$responseItem.description}}',
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: 'sort',
|
|
89
|
-
properties: {
|
|
90
|
-
key: 'name',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
routing: {
|
|
99
|
-
send: {
|
|
100
|
-
type: 'body',
|
|
101
|
-
property: 'model',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
default: 'models/text-bison-001',
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
displayName: 'Options',
|
|
108
|
-
name: 'options',
|
|
109
|
-
placeholder: 'Add Option',
|
|
110
|
-
description: 'Additional options to add',
|
|
111
|
-
type: 'collection',
|
|
112
|
-
default: {},
|
|
113
|
-
options: [
|
|
114
|
-
{
|
|
115
|
-
displayName: 'Maximum Number of Tokens',
|
|
116
|
-
name: 'maxOutputTokens',
|
|
117
|
-
default: 1024,
|
|
118
|
-
description: 'The maximum number of tokens to generate in the completion',
|
|
119
|
-
type: 'number',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
displayName: 'Sampling Temperature',
|
|
123
|
-
name: 'temperature',
|
|
124
|
-
default: 0.7,
|
|
125
|
-
typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
|
|
126
|
-
description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
|
|
127
|
-
type: 'number',
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
displayName: 'Top K',
|
|
131
|
-
name: 'topK',
|
|
132
|
-
default: 40,
|
|
133
|
-
typeOptions: { maxValue: 1, minValue: -1, numberPrecision: 1 },
|
|
134
|
-
description: 'Used to remove "long tail" low probability responses. Defaults to -1, which disables it.',
|
|
135
|
-
type: 'number',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
displayName: 'Top P',
|
|
139
|
-
name: 'topP',
|
|
140
|
-
default: 0.9,
|
|
141
|
-
typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
|
|
142
|
-
description: 'Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.',
|
|
143
|
-
type: 'number',
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
async supplyData(itemIndex) {
|
|
151
|
-
const credentials = await this.getCredentials('googlePalmApi');
|
|
152
|
-
const modelName = this.getNodeParameter('modelName', itemIndex);
|
|
153
|
-
const options = this.getNodeParameter('options', itemIndex, {});
|
|
154
|
-
const model = new googlepalm_1.GooglePaLM({
|
|
155
|
-
apiKey: credentials.apiKey,
|
|
156
|
-
modelName,
|
|
157
|
-
...options,
|
|
158
|
-
callbacks: [new N8nLlmTracing_1.N8nLlmTracing(this)],
|
|
159
|
-
});
|
|
160
|
-
return {
|
|
161
|
-
response: model,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
exports.LmGooglePalm = LmGooglePalm;
|
|
166
|
-
//# sourceMappingURL=LmGooglePalm.node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LmGooglePalm.node.js","sourceRoot":"","sources":["../../../../nodes/llms/LmG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-13s5.8-13 13-13c3.1 0 5.9 1.1 8.1 2.9l6.4-6.4C34.6 4.1 29.6 2 24 2 11.8 2 2 11.8 2 24s9.8 22 22 22c11 0 21-8 21-22 0-1.3-.2-2.7-.5-4"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path fill="#FBBC05" d="M0 37V11l17 13z" clip-path="url(#b)"/><path fill="#EA4335" d="m0 11 17 13 7-6.1L48 14V0H0z" clip-path="url(#b)"/><path fill="#34A853" d="m0 37 30-23 7.9 1L48 0v48H0z" clip-path="url(#b)"/><path fill="#4285F4" d="M48 48 17 24l-4-3 35-10z" clip-path="url(#b)"/></svg>
|