Chore/O3 MINI (#3962)

* add gemini flash

* add gemin flash to vertex

* add gemin-1.5-flash-preview to vertex

* add azure gpt 4o

* add claude 3.5 sonnet

* add mistral nemo

* add groq llama3.1

* add gpt4o-mini to azure

* o1 mini

* add groq llama 3.2

* update anthropic models

* add 3.5 haiku

* update vertex embedding models

* add azure o1 models

* add o3 mini

* add wolframalpha tool
This commit is contained in:
Henry Heng 2025-02-01 01:17:40 +00:00 committed by GitHub
parent 81cd904b73
commit a49177f7fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,25 @@
import { INodeParams, INodeCredential } from '../src/Interface'
class WolframAlphaApp implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'WolframAlpha App ID'
this.name = 'wolframAlphaAppId'
this.version = 1.0
this.description = 'Get an App Id from <a target="_blank" href="https://developer.wolframalpha.com">Wolfram Alpha Portal</a>'
this.inputs = [
{
label: 'App ID',
name: 'wolframAlphaAppId',
type: 'password'
}
]
}
}
module.exports = { credClass: WolframAlphaApp }

View File

@ -616,6 +616,10 @@
"label": "gpt-4o-2024-05-13",
"name": "gpt-4o-2024-05-13"
},
{
"label": "o3-mini",
"name": "o3-mini"
},
{
"label": "o1-preview (latest)",
"name": "o1-preview"

View File

@ -211,6 +211,9 @@ class ChatOpenAI_ChatModels implements INode {
streaming: streaming ?? true
}
if (modelName === 'o3-mini') {
delete obj.temperature
}
if (maxTokens) obj.maxTokens = parseInt(maxTokens, 10)
if (topP) obj.topP = parseFloat(topP)
if (frequencyPenalty) obj.frequencyPenalty = parseFloat(frequencyPenalty)

View File

@ -0,0 +1,44 @@
import { WolframAlphaTool } from '@langchain/community/tools/wolframalpha'
import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Interface'
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
class WolframAlpha_Tools implements INode {
label: string
name: string
version: number
description: string
type: string
icon: string
category: string
baseClasses: string[]
credential: INodeParams
inputs: INodeParams[]
constructor() {
this.label = 'WolframAlpha'
this.name = 'wolframAlpha'
this.version = 1.0
this.type = 'WolframAlpha'
this.icon = 'wolframalpha.png'
this.category = 'Tools'
this.description = 'Wrapper around WolframAlpha - a powerful computational knowledge engine'
this.inputs = []
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['wolframAlphaAppId']
}
this.baseClasses = [this.type, ...getBaseClasses(WolframAlphaTool)]
}
async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const wolframAlphaAppId = getCredentialParam('wolframAlphaAppId', credentialData, nodeData)
return new WolframAlphaTool({
appid: wolframAlphaAppId
})
}
}
module.exports = { nodeClass: WolframAlpha_Tools }

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB