Skip to content

Commit

Permalink
rely on llm status rather than initialised variable
Browse files Browse the repository at this point in the history
  • Loading branch information
shogunpurple committed Dec 4, 2024
1 parent 82a1165 commit 7fcff8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/pro
Submodule pro updated from e60f4b to 0d7fa3
4 changes: 2 additions & 2 deletions packages/server/src/utilities/rowProcessor/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ export async function processAIColumns<T extends Row | Row[]>(
const numRows = Array.isArray(inputRows) ? inputRows.length : 1
span?.addTags({ table_id: table._id, numRows })
const rows = Array.isArray(inputRows) ? inputRows : [inputRows]
const llm = await pro.ai.LargeLanguageModel.forCurrentTenant("gpt-4o-mini")
if (rows && llm.initialised) {
const llmWrapper = await pro.ai.LargeLanguageModel.forCurrentTenant("gpt-4o-mini")
if (rows && llmWrapper.llm) {
// Ensure we have snippet context
await context.ensureSnippetContext()

Expand Down

0 comments on commit 7fcff8a

Please sign in to comment.