Skip to content

Commit

Permalink
Merge pull request #127 from supabase-community/fix/message-import
Browse files Browse the repository at this point in the history
Fix tool invocations in message import
  • Loading branch information
gregnr authored Nov 5, 2024
2 parents f1dcb5c + 134e7dc commit d4f4b9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/postgres-new/lib/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class DbManager {

const values = messages.map(
(message) =>
sql`(${message.id}, ${message.databaseId}, ${message.role}, ${message.content}, ${message.toolInvocations ? JSON.stringify(message.toolInvocations) : raw`${null}`}, ${message.createdAt})`
sql`(${message.id}, ${message.databaseId}, ${message.role}, ${message.content}, ${message.toolInvocations}, ${message.createdAt})`
)

return metaDb.sql`insert into messages (id, database_id, role, content, tool_invocations, created_at) values ${join(values, ',')} on conflict (id) do nothing`
Expand Down

0 comments on commit d4f4b9c

Please sign in to comment.