mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 23:53:25 +00:00
chore: sentry tag of schedule task (#168)
This commit is contained in:
@@ -98,6 +98,7 @@ export async function getChatServerResponse(
|
||||
}
|
||||
: undefined,
|
||||
userSystemPrompt: `${personalization}\n${scheduleSystemPrompt}`,
|
||||
isScheduledTask: true,
|
||||
}),
|
||||
})
|
||||
|
||||
|
||||
@@ -51,6 +51,10 @@ export function createChatRoutes(deps: ChatRouteDeps) {
|
||||
async (c) => {
|
||||
const request = c.get('validatedBody') as ChatRequest
|
||||
|
||||
Sentry.getCurrentScope().setTag(
|
||||
'request-type',
|
||||
request.isScheduledTask ? 'schedule' : 'chat',
|
||||
)
|
||||
Sentry.setContext('request', {
|
||||
provider: request.provider,
|
||||
model: request.model,
|
||||
|
||||
@@ -44,6 +44,7 @@ export const ChatRequestSchema = VercelAIConfigSchema.extend({
|
||||
contextWindowSize: z.number().optional(),
|
||||
browserContext: BrowserContextSchema.optional(),
|
||||
userSystemPrompt: z.string().optional(),
|
||||
isScheduledTask: z.boolean().optional().default(false),
|
||||
})
|
||||
|
||||
export type ChatRequest = z.infer<typeof ChatRequestSchema>
|
||||
|
||||
Reference in New Issue
Block a user