fix(ai): use correct llama.cpp model name
- Update model to qwen2.5-coder-32b-instruct-Q4_K_M - Match actual model available in llama.cpp on port 8081 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ export async function POST() {
|
|||||||
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
||||||
try {
|
try {
|
||||||
res = await client.chat.completions.create({
|
res = await client.chat.completions.create({
|
||||||
model: 'qwen2.5-coder-8k:latest',
|
model: 'qwen2.5-coder-32b-instruct-Q4_K_M',
|
||||||
max_tokens: 2048,
|
max_tokens: 2048,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
@@ -166,7 +166,7 @@ Flag only zones with rising or elevated risk (at most 5 flags; do not flag healt
|
|||||||
|
|
||||||
await withUser(session.sub, async tx =>
|
await withUser(session.sub, async tx =>
|
||||||
writeAuditLog(tx, 'incidents', session.sub, 'ai_risk_flags',
|
writeAuditLog(tx, 'incidents', session.sub, 'ai_risk_flags',
|
||||||
{ flags, summary: input.summary, model: 'qwen2.5-coder-8k:latest' })
|
{ flags, summary: input.summary, model: 'qwen2.5-coder-32b-instruct-Q4_K_M' })
|
||||||
)
|
)
|
||||||
|
|
||||||
return NextResponse.json({ flags, summary: input.summary })
|
return NextResponse.json({ flags, summary: input.summary })
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export async function POST(
|
|||||||
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
||||||
try {
|
try {
|
||||||
res = await client.chat.completions.create({
|
res = await client.chat.completions.create({
|
||||||
model: 'qwen2.5-coder-8k:latest',
|
model: 'qwen2.5-coder-32b-instruct-Q4_K_M',
|
||||||
max_tokens: 2048,
|
max_tokens: 2048,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
@@ -105,7 +105,7 @@ Provide 3–5 Why steps drilling from immediate cause to root cause. Frame CAPA
|
|||||||
await withUser(session.sub, async tx => {
|
await withUser(session.sub, async tx => {
|
||||||
await writeAuditLog(tx, 'incidents', id, 'ai_rca_draft', {
|
await writeAuditLog(tx, 'incidents', id, 'ai_rca_draft', {
|
||||||
root_cause_summary: draft.root_cause_summary as string,
|
root_cause_summary: draft.root_cause_summary as string,
|
||||||
model: 'qwen2.5-coder-8k:latest',
|
model: 'qwen2.5-coder-32b-instruct-Q4_K_M',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export async function POST(
|
|||||||
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
||||||
try {
|
try {
|
||||||
res = await client.chat.completions.create({
|
res = await client.chat.completions.create({
|
||||||
model: 'qwen2.5-coder-8k:latest',
|
model: 'qwen2.5-coder-32b-instruct-Q4_K_M',
|
||||||
max_tokens: 1024,
|
max_tokens: 1024,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
@@ -103,7 +103,7 @@ Output exactly this JSON structure:
|
|||||||
}
|
}
|
||||||
|
|
||||||
await withUser(session.sub, async tx => {
|
await withUser(session.sub, async tx => {
|
||||||
await writeAuditLog(tx, 'incidents', id, 'ai_triage_suggest', { suggestion: input, model: 'qwen2.5-coder-8k:latest' })
|
await writeAuditLog(tx, 'incidents', id, 'ai_triage_suggest', { suggestion: input, model: 'qwen2.5-coder-32b-instruct-Q4_K_M' })
|
||||||
})
|
})
|
||||||
|
|
||||||
return NextResponse.json(input)
|
return NextResponse.json(input)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export async function POST(request: NextRequest) {
|
|||||||
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
let res: Awaited<ReturnType<typeof client.chat.completions.create>>
|
||||||
try {
|
try {
|
||||||
res = await client.chat.completions.create({
|
res = await client.chat.completions.create({
|
||||||
model: 'qwen2.5-coder-8k:latest',
|
model: 'qwen2.5-coder-32b-instruct-Q4_K_M',
|
||||||
max_tokens: 1024,
|
max_tokens: 1024,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
@@ -87,7 +87,7 @@ Scoring criteria: specificity (location, time, persons involved), completeness (
|
|||||||
|
|
||||||
await withUser(session.sub, async tx => {
|
await withUser(session.sub, async tx => {
|
||||||
await writeAuditLog(tx, 'incidents', session.sub, 'ai_quality_check', {
|
await writeAuditLog(tx, 'incidents', session.sub, 'ai_quality_check', {
|
||||||
score: input.score, passes: input.passes, model: 'qwen2.5-coder-8k:latest',
|
score: input.score, passes: input.passes, model: 'qwen2.5-coder-32b-instruct-Q4_K_M',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user