mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-14 03:52:26 +08:00
test(openai): isolate visible TTFT fixture
This commit is contained in:
@@ -403,6 +403,16 @@ func assertOpenAINativeLargeOpenEventTimesOutWithoutLeak(t *testing.T, line stri
|
||||
}
|
||||
|
||||
func TestOpenAINativeFirstOutputEOFDispatchesTerminalEventWithoutBlankLine(t *testing.T) {
|
||||
gatewayForwardingCache.Store(&cachedGatewayForwardingSettings{
|
||||
openAITTFTMode: OpenAITTFTModeVisible,
|
||||
expiresAt: time.Now().Add(time.Minute).UnixNano(),
|
||||
})
|
||||
t.Cleanup(func() {
|
||||
gatewayForwardingCache.Store(&cachedGatewayForwardingSettings{
|
||||
openAITTFTMode: OpenAITTFTModeSemantic,
|
||||
expiresAt: time.Now().Add(time.Minute).UnixNano(),
|
||||
})
|
||||
})
|
||||
cfg := &config.Config{Gateway: config.GatewayConfig{
|
||||
OpenAIFirstOutputTimeoutSeconds: 1,
|
||||
MaxLineSize: defaultMaxLineSize,
|
||||
|
||||
Reference in New Issue
Block a user