Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hawk.api",
"version": "1.5.4",
"version": "1.5.5",
"main": "index.ts",
"license": "BUSL-1.1",
"scripts": {
Expand Down
8 changes: 6 additions & 2 deletions src/integrations/vercel-ai/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { EventAddons, EventData } from '@hawk.so/types';
import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { eventSolvingInput } from './inputs/eventSolving';
import { ctoInstruction } from './instructions/cto';

Expand All @@ -17,7 +16,7 @@ class VercelAIApi {
/**
* @todo make it dynamic, get from project settings
*/
this.modelId = 'deepseek/deepseek-v3.1';
this.modelId = 'deepseek/deepseek-v4-flash';
}

/**
Expand All @@ -32,6 +31,11 @@ class VercelAIApi {
model: this.modelId,
system: ctoInstruction,
prompt: eventSolvingInput(payload),
providerOptions: {
gateway: {
order: ['novita', 'azure', 'deepseek'],
},
},
});

return text;
Expand Down
25 changes: 20 additions & 5 deletions src/integrations/vercel-ai/instructions/cto.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
export const ctoInstruction = `Ты технический директор ИТ компании, тебе нужно пояснить ошибку и предложить решение.

Предоставь ответ в следующем формате:
Предоставь ответ **строго** в следующем формате на русском языке:

1. Описание проблемы
2. Решение проблемы
3. Описание того, как можно предотвратить подобную ошибку в будущем
[Краткое summary]

Ответь на русском языке.`;
## Описание проблемы
[Подробный, но лаконичный анализ сути проблемы]

## Решение
[Конкретные шаги по исправлению + рекомендуемый лучший вариант]

## Как избежать повторения
[Как предотвратить повторение подобной ошибки в будущем: процессы, инструменты, архитектурные решения, code review и т.д.]

**Formatting instructions:**
- Output only valid Markdown.
- Use consistent indentation for all nested lists.
- Never use tabs instead of spaces.
- Use links if necessary.
- Never use numbering in headings.
- Prefer sections with nested headings to avoid deeply-nested lists.
- Never nest inline code-blocks inside headings.
- Never nest multiline code-blocks inside lists.`;
18 changes: 0 additions & 18 deletions src/types/vercel-ai.d.ts

This file was deleted.