-
Notifications
You must be signed in to change notification settings - Fork 7
Feature Evals βππ§ͺπ―π° #446
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
base: main
Are you sure you want to change the base?
Conversation
* added patch * added evals function * added eval cmd
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the β¨ Finishing touchesπ§ͺ Generate unit tests
Comment |
* add prompts.yaml to bundle * process prompts on deployment * Remove hash check since we're moving it to the API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can talk next week and i can help here but just some cursory review
return sb.String() | ||
} | ||
|
||
// escapeString escapes a string for use in TypeScript string literals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have Interpolate in go-common string we should probably use.
cmd.Stdout = ctx.Writer | ||
cmd.Stderr = ctx.Writer | ||
if err := cmd.Run(); err != nil { | ||
if ctx.DevMode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
} | ||
|
||
func copyPromptsFromSrc(logger logger.Logger, projectDir, outdir string) error { | ||
srcRoot := filepath.Join(projectDir, "src") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't use source directly like this. must go through the ProjectContext to get the correct source folder otherwise this will break for python
// generatePromptTypeDeclarations generates only TypeScript declarations for prompt methods | ||
func generatePromptTypeDeclarations(logger logger.Logger, projectDir string) error { | ||
// Find all prompts.yaml files in the source directory | ||
srcRoot := filepath.Join(projectDir, "src") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use src like this. use project context
methodSignatures.WriteString(fmt.Sprintf(" * @param variables - Template variables to substitute\n")) | ||
methodSignatures.WriteString(fmt.Sprintf(" * @returns Object with system and prompt strings, both with attached metadata properties\n")) | ||
methodSignatures.WriteString(fmt.Sprintf(" */\n")) | ||
methodSignatures.WriteString(fmt.Sprintf(" %s(variables?: Record<string, unknown>): Promise<{\n", methodName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can probably just use a otel span here with the right prompt id
No description provided.