-
Notifications
You must be signed in to change notification settings - Fork 127
Feature: mimic the qualifire integration in python sdk #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 11 commits
12e2fbf
1cc20ab
800f931
eb9b8cc
c17f366
37d8152
d9d3273
c3223ee
673b0c3
db079ce
db44d1d
701181b
fe4c1ff
edc73fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,3 +90,6 @@ dist/ | |
| .adk/ | ||
| **/.rogue | ||
| bin/ | ||
|
|
||
| # Go TUI | ||
| packages/tui/cmd/rogue/__debug* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| import { EvaluationResult, ReportSummaryRequest, StructuredSummary } from "./types"; | ||
|
|
||
| interface QualifireReportPayload { | ||
| job_id: string; | ||
| evaluations: EvaluationResult; | ||
| structured: StructuredSummary | null; | ||
| deep_test: boolean; | ||
| start_time: string; | ||
| judge_model: string | null; | ||
| } | ||
|
|
||
| export interface QualifireClientOptions { | ||
| logger?: (message: string) => void; | ||
| } | ||
|
|
||
| export class QualifireClient { | ||
| private static convertWithStructuredSummary( | ||
| evaluationResults: EvaluationResult, | ||
| request: ReportSummaryRequest | ||
| ): QualifireReportPayload { | ||
| return { | ||
| job_id: request.job_id, | ||
| evaluations: evaluationResults, | ||
| structured: request.structuredSummary || null, | ||
| deep_test: request.deepTest ?? false, | ||
| start_time: request.startTime ?? new Date().toISOString(), | ||
| judge_model: request.judgeModel || null, | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * Reports evaluation summary to Qualifire. | ||
| * | ||
| * @param evaluationResults - The evaluation results to report | ||
| * @param request - Configuration including Qualifire URL, API key, and metadata | ||
| * @throws {Error} If the API request fails or returns a non-2xx status | ||
| * @returns A promise that resolves when the report is successfully submitted | ||
| */ | ||
| public static async reportSummaryToQualifire( | ||
| evaluationResults: EvaluationResult, | ||
| request: ReportSummaryRequest, | ||
| options?: QualifireClientOptions | ||
| ): Promise<void> { | ||
| options?.logger?.("Reporting summary to Qualifire"); | ||
|
|
||
| const apiKey = request.qualifireApiKey; | ||
| const baseUrl = request.qualifireUrl ?? "https://api.qualifire.com"; | ||
| const endpoint = `${baseUrl}/api/v1/evaluations`; | ||
|
|
||
| if (!apiKey) { | ||
| throw new Error("qualifireApiKey is required but was undefined"); | ||
| } | ||
|
|
||
| if (!baseUrl || baseUrl === "undefined") { | ||
| throw new Error("Invalid qualifireUrl provided"); | ||
| } | ||
|
Comment on lines
46
to
56
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π§© Analysis chainDesign mismatch with PR objective: route via Rogue server, not direct Qualifire. This class posts directly to Qualifire ( Would you run the script below to locate the server summary endpoint and confirm the expected header so we can align the client? π Script executed: #!/bin/bash
set -euo pipefail
echo "== Find Rogue summary endpoint and Qualifire service usage =="
fd -a llm.py rogue/server | xargs -I{} rg -n -C3 -e 'router\.(post|get|put)\(' -e 'summary' {}
rg -n -C3 'qualifire' rogue/server || true
rg -n -C3 'X-Qualifire' rogue/server || trueLength of output: 8186 π Script executed: #!/bin/bash
set -euo pipefail
echo "== Check SDK qualifire client implementation =="
fd -a "qualifire.ts|qualifier.ts" packages/sdk/src
echo ""
echo "== Find request models for server /summary endpoint =="
rg -n -A10 "class SummaryGenerationRequest|SummaryGenerationRequest =" rogue/server --type py
echo ""
echo "== Check what auth/headers are expected by Rogue /summary endpoint =="
rg -n -B5 -A15 "@router.post\(\s*\"/summary\"" rogue/server --type pyLength of output: 152 π Script executed: #!/bin/bash
set -euo pipefail
echo "== SDK qualifire.ts current implementation =="
cat /home/jailuser/git/packages/sdk/src/qualifire.ts
echo ""
echo "== Rogue server request models =="
fd -a "models.py|schemas.py|types.py" rogue/server/api rogue/server/schemas 2>/dev/null | head -5 | xargs -I{} sh -c 'echo "=== {} ===" && head -100 {}'
echo ""
echo "== Search for SummaryGenerationRequest in all Python files =="
rg -n "SummaryGenerationRequest" rogue/server --type py -B2 -A5Length of output: 3865 π Script executed: #!/bin/bash
set -euo pipefail
echo "== Find SummaryGenerationRequest definition =="
rg -n "class SummaryGenerationRequest|SummaryGenerationRequest\s*=" rogue/server -A15 --type py
echo ""
echo "== Check import source for SummaryGenerationRequest =="
rg -n "from.*import.*SummaryGenerationRequest" rogue/server --type pyLength of output: 46 π Script executed: #!/bin/bash
set -euo pipefail
echo "== Search for Summary in rogue module structure =="
fd -a ".py$" rogue/server | xargs rg -l "SummaryGenerationRequest" | head -10
echo ""
echo "== Find all python files in rogue/server/api =="
fd -a ".py$" rogue/server/api
echo ""
echo "== Check rogue/server/schemas or similar =="
fd -a "schema|model" rogue/server --type dLength of output: 463 π Script executed: #!/bin/bash
set -euo pipefail
echo "== List models directory =="
fd -a ".py$" rogue/server/models
echo ""
echo "== Search for SummaryGenerationRequest in models =="
rg -n "SummaryGenerationRequest" rogue/server/models -A10
echo ""
echo "== Check rogue/server/api/__init__.py for exports =="
cat rogue/server/api/__init__.pyLength of output: 184 π Script executed: #!/bin/bash
set -euo pipefail
echo "== Check models/__init__.py =="
cat rogue/server/models/__init__.py
echo ""
echo "== Check models/api_format.py =="
head -150 rogue/server/models/api_format.py
echo ""
echo "== Broader search for SummaryGenerationRequest =="
rg -n "SummaryGenerationRequest" rogue/ -A5 | head -50Length of output: 2608 π Script executed: #!/bin/bash
set -euo pipefail
echo "== Check llm.py imports (first 30 lines) =="
head -30 rogue/server/api/llm.py
echo ""
echo "== Search for SummaryGenerationRequest definition anywhere in repo =="
rg -n "class SummaryGenerationRequest|SummaryGenerationRequest.*=" --type pyLength of output: 1043 Design mismatch confirmed: SDK posts directly to Qualifire instead of routing through Rogue server. The SDK calls π€ Prompt for AI Agents |
||
|
|
||
| const apiEvaluationResult = this.convertWithStructuredSummary( | ||
| evaluationResults, | ||
| request | ||
| ); | ||
|
|
||
| const controller = new AbortController(); | ||
| const timeoutId = setTimeout(() => controller.abort(), 30000); | ||
|
|
||
| try { | ||
| const response = await fetch(endpoint, { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| "X-Qualifire-API-Key": apiKey, | ||
| }, | ||
| body: JSON.stringify(apiEvaluationResult), | ||
| signal: controller.signal | ||
| }); | ||
|
|
||
| if (!response.ok) { | ||
| const errText = await response.text(); | ||
| throw new Error( | ||
| `Qualifire report failed: ${response.status} ${response.statusText} - ${errText}` | ||
| ); | ||
| } | ||
| clearTimeout(timeoutId); | ||
| } catch (error) { | ||
| clearTimeout(timeoutId); | ||
| if (error instanceof Error && error.name === 'AbortError') { | ||
| throw new Error('Qualifire report timed out after 30 seconds'); | ||
| } | ||
| throw error; | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -45,19 +45,17 @@ func (m Model) handlePasteMsg(msg tea.PasteMsg) (Model, tea.Cmd) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Only paste into text fields (Agent URL and Judge Model) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if m.evalState.currentField <= 1 { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| switch m.evalState.currentField { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 0: // Agent URL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Insert at cursor position | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runes := []rune(m.evalState.AgentURL) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.AgentURL = string(runes[:m.evalState.cursorPos]) + cleanText + string(runes[m.evalState.cursorPos:]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.cursorPos += len([]rune(cleanText)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 1: // Judge Model | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Insert at cursor position | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runes := []rune(m.evalState.JudgeModel) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.JudgeModel = string(runes[:m.evalState.cursorPos]) + cleanText + string(runes[m.evalState.cursorPos:]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.cursorPos += len([]rune(cleanText)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| switch m.evalState.currentField { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 0: // Agent URL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Insert at cursor position | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runes := []rune(m.evalState.AgentURL) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.AgentURL = string(runes[:m.evalState.cursorPos]) + cleanText + string(runes[m.evalState.cursorPos:]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.cursorPos += len([]rune(cleanText)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case 3: // Judge Model | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Insert at cursor position | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| runes := []rune(m.evalState.JudgeModel) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.JudgeModel = string(runes[:m.evalState.cursorPos]) + cleanText + string(runes[m.evalState.cursorPos:]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState.cursorPos += len([]rune(cleanText)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
50
to
61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clamp cursorPos on paste to prevent panic. If cursorPos > len(runes), slicing will panic. Clamp before insertion. - // Only paste into text fields (Agent URL and Judge Model)
+ // Only paste into text fields (Agent URL and Judge Model)
switch m.evalState.currentField {
case 0: // Agent URL
- // Insert at cursor position
- runes := []rune(m.evalState.AgentURL)
+ // Insert at cursor position
+ runes := []rune(m.evalState.AgentURL)
+ if m.evalState.cursorPos > len(runes) {
+ m.evalState.cursorPos = len(runes)
+ }
m.evalState.AgentURL = string(runes[:m.evalState.cursorPos]) + cleanText + string(runes[m.evalState.cursorPos:])
m.evalState.cursorPos += len([]rune(cleanText))
case 3: // Judge Model
- // Insert at cursor position
- runes := []rune(m.evalState.JudgeModel)
+ // Insert at cursor position
+ runes := []rune(m.evalState.JudgeModel)
+ if m.evalState.cursorPos > len(runes) {
+ m.evalState.cursorPos = len(runes)
+ }
m.evalState.JudgeModel = string(runes[:m.evalState.cursorPos]) + cleanText + string(runes[m.evalState.cursorPos:])
m.evalState.cursorPos += len([]rune(cleanText))
}π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return m, nil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -202,14 +200,17 @@ func (m Model) handleCommandSelectedMsg(msg components.CommandSelectedMsg) (Mode | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Use the configured model in provider/model format | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| judgeModel = m.config.SelectedProvider + "/" + m.config.SelectedModel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // TODO read agent url and protocol .rogue/user_config.json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| m.evalState = &EvaluationViewState{ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ServerURL: m.config.ServerURL, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AgentURL: "http://localhost:10001", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| JudgeModel: judgeModel, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ParallelRuns: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DeepTest: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Scenarios: loadScenariosFromWorkdir(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cursorPos: len([]rune("http://localhost:10001")), // Set cursor to end of Agent URL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ServerURL: m.config.ServerURL, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AgentURL: "http://localhost:10001", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AgentProtocol: ProtocolA2A, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| AgentTransport: TransportHTTP, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| JudgeModel: judgeModel, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ParallelRuns: 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DeepTest: false, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Scenarios: loadScenariosFromWorkdir(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cursorPos: len([]rune("http://localhost:10001")), // Set cursor to end of Agent URL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| case "configure_models": | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Open LLM configuration dialog | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -37,8 +37,8 @@ func (m Model) renderNewEvaluation() string { | |||||
|
|
||||||
| title := titleStyle.Render("π§ͺ New Evaluation") | ||||||
|
|
||||||
| // Helper function to render a field with inline label and value | ||||||
| renderField := func(fieldIndex int, label, value string) string { | ||||||
| // Helper function to render a text field with inline label and value | ||||||
| renderTextField := func(fieldIndex int, label, value string) string { | ||||||
| active := m.evalState.currentField == fieldIndex | ||||||
|
|
||||||
| labelStyle := lipgloss.NewStyle(). | ||||||
|
|
@@ -83,8 +83,86 @@ func (m Model) renderNewEvaluation() string { | |||||
| return fieldContainer.Render(fieldContent) | ||||||
| } | ||||||
|
|
||||||
| // Helper function to render a dropdown field with indicators | ||||||
| renderDropdownField := func(fieldIndex int, label, value string) string { | ||||||
| active := m.evalState.currentField == fieldIndex | ||||||
|
|
||||||
| labelStyle := lipgloss.NewStyle(). | ||||||
| Foreground(t.TextMuted()). | ||||||
| Background(t.Background()). | ||||||
| Width(20). | ||||||
| Align(lipgloss.Right) | ||||||
|
|
||||||
| valueStyle := lipgloss.NewStyle(). | ||||||
| Foreground(t.Text()). | ||||||
| Background(t.Background()). | ||||||
| Padding(0, 1) | ||||||
|
|
||||||
| if active { | ||||||
| labelStyle = labelStyle.Foreground(t.Primary()).Bold(true) | ||||||
| valueStyle = valueStyle. | ||||||
| Foreground(t.Primary()). | ||||||
| Background(t.Background()). | ||||||
| Bold(true) | ||||||
| // Add dropdown indicators | ||||||
| value = "β " + value + " βΆ" | ||||||
| } | ||||||
|
|
||||||
| // Create a full-width container for the field | ||||||
| fieldContainer := lipgloss.NewStyle(). | ||||||
| Width(m.width-4). | ||||||
| Background(t.Background()). | ||||||
| Padding(0, 2) | ||||||
|
|
||||||
| fieldContent := lipgloss.JoinHorizontal(lipgloss.Left, | ||||||
| labelStyle.Render(label), | ||||||
| valueStyle.Render(value), | ||||||
| ) | ||||||
|
|
||||||
| return fieldContainer.Render(fieldContent) | ||||||
| } | ||||||
|
|
||||||
| // Helper function to render a toggle field | ||||||
| renderToggleField := func(fieldIndex int, label, value string) string { | ||||||
| active := m.evalState.currentField == fieldIndex | ||||||
|
|
||||||
| labelStyle := lipgloss.NewStyle(). | ||||||
| Foreground(t.TextMuted()). | ||||||
| Background(t.Background()). | ||||||
| Width(20). | ||||||
| Align(lipgloss.Right) | ||||||
|
|
||||||
| valueStyle := lipgloss.NewStyle(). | ||||||
| Foreground(t.Text()). | ||||||
| Background(t.Background()). | ||||||
| Padding(0, 1) | ||||||
|
|
||||||
| if active { | ||||||
| labelStyle = labelStyle.Foreground(t.Primary()).Bold(true) | ||||||
| valueStyle = valueStyle. | ||||||
| Foreground(t.Primary()). | ||||||
| Background(t.Background()). | ||||||
| Bold(true) | ||||||
| } | ||||||
|
|
||||||
| // Create a full-width container for the field | ||||||
| fieldContainer := lipgloss.NewStyle(). | ||||||
| Width(m.width-4). | ||||||
| Background(t.Background()). | ||||||
| Padding(0, 2) | ||||||
|
|
||||||
| fieldContent := lipgloss.JoinHorizontal(lipgloss.Left, | ||||||
| labelStyle.Render(label), | ||||||
| valueStyle.Render(value), | ||||||
| ) | ||||||
|
|
||||||
| return fieldContainer.Render(fieldContent) | ||||||
| } | ||||||
|
|
||||||
| // Prepare field values | ||||||
| agent := m.evalState.AgentURL | ||||||
| protocol := string(m.evalState.AgentProtocol) | ||||||
| transport := string(m.evalState.AgentTransport) | ||||||
| judge := m.evalState.JudgeModel | ||||||
| deep := "β" | ||||||
| if m.evalState.DeepTest { | ||||||
|
|
@@ -93,7 +171,7 @@ func (m Model) renderNewEvaluation() string { | |||||
|
|
||||||
| // Helper function to render the start button | ||||||
| renderStartButton := func() string { | ||||||
| active := m.evalState.currentField == 3 | ||||||
| active := m.evalState.currentField == 5 | ||||||
| var buttonText string | ||||||
|
|
||||||
| if m.evalSpinner.IsActive() { | ||||||
|
|
@@ -151,9 +229,11 @@ func (m Model) renderNewEvaluation() string { | |||||
|
|
||||||
| // Build the content sections | ||||||
| formSection := lipgloss.JoinVertical(lipgloss.Left, | ||||||
| renderField(0, "Agent URL:", agent), | ||||||
| renderField(1, "Judge LLM:", judge), | ||||||
| renderField(2, "Deep Test:", deep), | ||||||
| renderTextField(0, "Agent URL:", agent), | ||||||
| renderDropdownField(1, "Protocol:", protocol), | ||||||
| renderDropdownField(2, "Transport:", transport), | ||||||
| renderTextField(3, "Judge LLM:", judge), | ||||||
| renderToggleField(4, "Deep Test:", deep), | ||||||
| ) | ||||||
|
|
||||||
| var infoLines []string | ||||||
|
|
@@ -168,7 +248,7 @@ func (m Model) renderNewEvaluation() string { | |||||
|
|
||||||
| buttonSection := renderStartButton() | ||||||
|
|
||||||
| helpText := helpStyle.Render("t Test Server β/β switch fields β/β move cursor Space toggle Enter activate Esc Back") | ||||||
| helpText := helpStyle.Render("t Test Server β/β switch fields β/β move cursor/cycle dropdown Space toggle Enter activate Esc Back") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Help text advertises "t Test Server" with no visible key binding. Either wire a 't' handler or remove/update the hint to avoid confusing users. Apply one of: - helpText := helpStyle.Render("t Test Server β/β switch fields β/β move cursor/cycle dropdown Space toggle Enter activate Esc Back")
+ helpText := helpStyle.Render("β/β switch fields β/β move cursor/cycle dropdown Space toggle Enter activate Esc Back")Or add the actual 't' binding where appropriate. π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||
|
|
||||||
| // Calculate content area height (excluding title and help) | ||||||
| contentHeight := m.height - 6 // title(3) + help(1) + margins(2) | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type mismatch:
deep_testandstart_timeshould be nullable.The
QualifireReportPayloadinterface definesdeep_test: booleanandstart_time: stringas required fields. However, the source fields inReportSummaryRequestare optional (deepTest?: boolean,startTime?: string). This creates a type mismatch whereundefinedvalues can be assigned to non-nullable fields in the payload, violating the type contract and potentially causing API errors.Apply this diff to make the fields nullable:
interface QualifireReportPayload { job_id: string; evaluations: EvaluationResult; structured: StructuredSummary | null; - deep_test: boolean; - start_time: string; + deep_test: boolean | null; + start_time: string | null; judge_model: string | null; }Then update the mapping in
convertWithStructuredSummary:return { job_id: request.job_id, evaluations: evaluationResults, structured: request.structuredSummary || null, - deep_test: request.deepTest, - start_time: request.startTime, + deep_test: request.deepTest ?? null, + start_time: request.startTime ?? null, judge_model: request.judgeModel || null, };π€ Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ignorant05 I think this comment is correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.