Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Log all prompts from specific users#62894

Merged
rafax merged 6 commits into
mainfrom
rg/log_prompts_from_users
May 27, 2024
Merged

Log all prompts from specific users#62894
rafax merged 6 commits into
mainfrom
rg/log_prompts_from_users

Conversation

@rafax

@rafax rafax commented May 24, 2024

Copy link
Copy Markdown
Contributor

This PR adds support for logging all prompts sent by specific actors (provided in CODY_GATEWAY_IDENTIFIERS_TO_LOG_FOR env var).
Slack context.

Closes PRIME-250.

Test plan

  • locally tested
  • e2e tests pass

@cla-bot cla-bot Bot added the cla-signed label May 24, 2024
@rafax rafax requested review from a team May 24, 2024 10:01

@taras-yemets taras-yemets left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

}
if act.IsDotComActor() && config.IdentifiersToLogFor.Has(act.ID) {
requestMetadata["full_prompt"] = body.BuildPrompt()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👀 marking this as the meat of this PR

@vdavid vdavid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, thanks for adding this, Rafal!

@rafax rafax enabled auto-merge (squash) May 27, 2024 12:51
@rafax rafax merged commit 4280a3e into main May 27, 2024
@rafax rafax deleted the rg/log_prompts_from_users branch May 27, 2024 13:03
@chenkc805

Copy link
Copy Markdown
Contributor

Thanks Rafal. Where is CODY_GATEWAY_IDENTIFIERS_TO_LOG_FOR defined?

@rafax

rafax commented May 29, 2024

Copy link
Copy Markdown
Contributor Author

Thanks Rafal. Where is CODY_GATEWAY_IDENTIFIERS_TO_LOG_FOR defined?

The value is set in Cody Gateway configuration in the infrastructure private repo (will follow-up on Slack).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants