( ctx context.Context, model fantasy.LanguageModel, systemPrompt string, userInput string, )
| 440 | } |
| 441 | |
| 442 | func generateStructuredTitle( |
| 443 | ctx context.Context, |
| 444 | model fantasy.LanguageModel, |
| 445 | systemPrompt string, |
| 446 | userInput string, |
| 447 | ) (string, error) { |
| 448 | title, _, err := generateStructuredTitleWithUsage( |
| 449 | ctx, |
| 450 | model, |
| 451 | systemPrompt, |
| 452 | userInput, |
| 453 | ) |
| 454 | if err != nil { |
| 455 | return "", err |
| 456 | } |
| 457 | return title, nil |
| 458 | } |
| 459 | |
| 460 | func generateStructuredTitleWithUsage( |
| 461 | ctx context.Context, |
no test coverage detected