mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-10 01:39:12 +00:00
fix: improve LLM test feedback for empty responses (#162)
* fix: show explicit success message and handle empty LLM response * fix: enhance MaxTokens to accommodate reasoning model tests * chore: optimize code conventions * chore: delete \n
This commit is contained in:
parent
257f9ac105
commit
848f97b44e
1 changed files with 8 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ func runLLMTest() error {
|
|||
return llmClient.CompletionsWithCtx(ctx, llm.ChatRequest{
|
||||
Model: ep.Model,
|
||||
Messages: messages,
|
||||
MaxTokens: 256,
|
||||
MaxTokens: 2048,
|
||||
})
|
||||
}()
|
||||
if err != nil {
|
||||
|
|
@ -86,7 +86,13 @@ func runLLMTest() error {
|
|||
fmt.Printf("Source: %s\n", ep.Source)
|
||||
fmt.Printf("URL: %s\n", ep.URL)
|
||||
fmt.Printf("Model: %s\n", model)
|
||||
fmt.Printf("%s\n", resp.Content())
|
||||
|
||||
content := resp.Content()
|
||||
if content == "" {
|
||||
content = "(empty response)"
|
||||
}
|
||||
fmt.Printf("%s\n", content)
|
||||
fmt.Println("✓ Connection test successful")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue