glide
glide copied to clipboard
💥 Map message roles to unified roles
The message roles in the request schema is currently defined as a basic string. However, roles are not exactly the same across all providers. Let's try to unify that aspect of the Glide response contact.
Also, please make the role field optional and will with the user role by default.
we are referring to
type ChatRequest struct {
Message ChatMessage `json:"message" validate:"required"`
MessageHistory []ChatMessage `json:"messageHistory"`
Override *OverrideChatRequest `json:"override,omitempty"`
}
and
type ChatMessage struct {
// The role of the author of this message. One of system, user, or assistant.
Role string `json:"role" validate:"required"`
// The content of the message.
Content string `json:"content" validate:"required"`
// The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores,
// with a maximum length of 64 characters.
Name string `json:"name,omitempty"`
}
for request schema right ?
@ankitsridhar16 yes, correct, but be aware please that @tom-fitz is already on this one 👀
@roma-glushko please assign this one to me please!