Added a configurable timeout knob
This commit is contained in:
@@ -61,7 +61,7 @@ func TestHandlerPostRunsSuccess(t *testing.T) {
|
||||
"transcript": {"type": "file", "uri": "./t.md"}
|
||||
},
|
||||
"vars": {"k": "v"},
|
||||
"model": {"model": "gpt-x"}
|
||||
"model": {"model": "gpt-x", "timeout_seconds": 120}
|
||||
}`)
|
||||
req := httptest.NewRequest(http.MethodPost, "/v1/runs", bytes.NewReader(body))
|
||||
w := httptest.NewRecorder()
|
||||
@@ -91,6 +91,9 @@ func TestHandlerPostRunsSuccess(t *testing.T) {
|
||||
if r.last.Model == nil || r.last.Model.Model != "gpt-x" {
|
||||
t.Fatalf("expected model override, got %#v", r.last.Model)
|
||||
}
|
||||
if r.last.Model.TimeoutSeconds != 120 {
|
||||
t.Fatalf("expected timeout_seconds override 120, got %#v", r.last.Model)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHandlerInvalidJSON(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user