-
Notifications
You must be signed in to change notification settings - Fork 167
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
fix(go): fix bug where dev UI configs aren't respected #2234
base: main
Are you sure you want to change the base?
Conversation
@@ -314,32 +315,50 @@ func generate( | |||
return r, nil | |||
} | |||
|
|||
func mapToStruct(m map[string]interface{}, v interface{}) error { |
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 mapToStruct(m map[string]interface{}, v interface{}) error { | |
func mapToStruct(m map[string]any, v any) error { |
gm.SetTopP(float32(c.TopP)) | ||
} | ||
var c ai.GenerationCommonConfig | ||
if err := mapToStruct(input.Config.(map[string]interface{}), &c); err != nil { |
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.
It's not always a map though. It only comes in as a map if the request is from Dev UI. If you run a flow with a Generate call that has a config set, it will behave correctly. So this change is now breaking that I'm pretty sure.
Tested manually in Dev UI.