Skip to content

ChainGraph API Documentation / @badaitech/chaingraph-nodes / createLLMInstance

Function: createLLMInstance()

createLLMInstance(config, apiKey): ChatDeepSeek | ChatOpenAI<ChatOpenAICallOptions> | ChatAnthropic | ChatGoogleGenerativeAI | ChatGroq

Defined in: packages/chaingraph-nodes/src/nodes/ai/llm-call-with-structured-output-v2.node.ts:558

Create an LLM instance based on the selected model.

Parameters

config

LLMConfig

apiKey

string

Returns

ChatDeepSeek | ChatOpenAI<ChatOpenAICallOptions> | ChatAnthropic | ChatGoogleGenerativeAI | ChatGroq

Licensed under BUSL-1.1