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

💥 Map message roles to unified roles #265

Open
roma-glushko opened this issue Jun 2, 2024 · 3 comments · May be fixed by #269
Open

💥 Map message roles to unified roles #265

roma-glushko opened this issue Jun 2, 2024 · 3 comments · May be fixed by #269
Assignees
Labels
api:http good first issue Good for newcomers help wanted Extra attention is needed model:language size:small type:breaking 💥 Introduces a breaking changes to API, configuration or behavior introduced before

Comments

@roma-glushko
Copy link
Member

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.

@roma-glushko roma-glushko added api:http size:small model:language type:breaking 💥 Introduces a breaking changes to API, configuration or behavior introduced before good first issue Good for newcomers help wanted Extra attention is needed labels Jun 2, 2024
@ankitsridhar16
Copy link

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 ?

@roma-glushko
Copy link
Member Author

@ankitsridhar16 yes, correct, but be aware please that @tom-fitz is already on this one 👀

@tom-fitz
Copy link
Contributor

@roma-glushko please assign this one to me please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:http good first issue Good for newcomers help wanted Extra attention is needed model:language size:small type:breaking 💥 Introduces a breaking changes to API, configuration or behavior introduced before
Projects
None yet
3 participants