Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds additional logs for output candidates #834

Closed
wants to merge 2 commits into from

Conversation

bryanatkinson
Copy link
Contributor

Output logs now include:

  • usage information (tokens, images, etc) overall and by candidate
  • custom output candidate metadata - this includes the safety scores for gemini

Checklist (if applicable):

  • Tested (manually, unit tested, etc.)
  • Changelog updated
  • Docs updated

…d by candidate, as well as custom candidate data including safety scores.
Copy link
Member

@MichaelDoyle MichaelDoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but keep in mind multi-candidate responses are going away.

logger.logStructured(`Output Candidate[${path}, ${model}]${candCounts}`, {
...sharedMetadata,
candidateIndex: candIdx,
totalCandidates: candidates,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be able to leave these two props out, because Genkit is moving away from multiple candidates.

@MichaelDoyle
Copy link
Member

Ping on this @bryanatkinson

@schnecle
Copy link
Contributor

Ported to #919 following #866

@schnecle schnecle closed this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants