( ctx context.Context, t *testing.T, db database.Store, orgID uuid.UUID, user database.User, model database.ChatModelConfig, workerID uuid.UUID, title string, )
| 160 | } |
| 161 | |
| 162 | func seedRemoteRunningChat( |
| 163 | ctx context.Context, |
| 164 | t *testing.T, |
| 165 | db database.Store, |
| 166 | orgID uuid.UUID, |
| 167 | user database.User, |
| 168 | model database.ChatModelConfig, |
| 169 | workerID uuid.UUID, |
| 170 | title string, |
| 171 | ) database.Chat { |
| 172 | t.Helper() |
| 173 | |
| 174 | chat := seedWaitingChat(t, db, orgID, user, model, title) |
| 175 | now := time.Now() |
| 176 | chat, err := db.UpdateChatStatus(ctx, database.UpdateChatStatusParams{ |
| 177 | ID: chat.ID, |
| 178 | Status: database.ChatStatusRunning, |
| 179 | WorkerID: uuid.NullUUID{UUID: workerID, Valid: true}, |
| 180 | StartedAt: sql.NullTime{Time: now, Valid: true}, |
| 181 | HeartbeatAt: sql.NullTime{Time: now, Valid: true}, |
| 182 | }) |
| 183 | require.NoError(t, err) |
| 184 | return chat |
| 185 | } |
| 186 | |
| 187 | func setOpenAIProviderBaseURL( |
| 188 | ctx context.Context, |
no test coverage detected