feat(summary): send complete articles within user budget (#39)
This commit is contained in:
@ -33,7 +33,11 @@ func (r RepositoryAdapter) LoadUserInput(ctx context.Context, id string) (UserIn
|
||||
if value == "" {
|
||||
limit = 50
|
||||
}
|
||||
return UserInput{SummaryModelID: p.SummaryModelID, Language: p.Language, RankingMode: p.RankingMode, GlobalLimit: limit, Assets: assets, Sources: models.OperationalSources(sources)}, nil
|
||||
summaryContext, err := r.Repo.GetSetting("ai_system_prompt")
|
||||
if err != nil {
|
||||
return UserInput{}, err
|
||||
}
|
||||
return UserInput{SummaryContext: summaryContext, SummaryPromptTokenBudget: p.SummaryPromptTokenBudget, SummaryModelID: p.SummaryModelID, Language: p.Language, RankingMode: p.RankingMode, GlobalLimit: limit, Assets: assets, Sources: models.OperationalSources(sources)}, nil
|
||||
}
|
||||
func (r RepositoryAdapter) SaveGeneration(ctx context.Context, id string, record GenerationRecord) error {
|
||||
payload, err := json.Marshal(record.Outcome)
|
||||
|
||||
Reference in New Issue
Block a user