Skip to content

Extend messages type #2932

Closed
Closed
@alicercedigital

Description

@alicercedigital

Feature Description

It is very simple:
We need to extend messages to add other properties. On our app we store the total token and the cost to generate each message and because we use a lot of different agents so we need to store agent name, model and avatar.
We can´t use the useChat because of that.

If we could just extend the message type for example adding a properties customProperties then we could use the useChat or anything that use the CoreMessage.

Use Case

If we could extend the message we make the messages be usable to any type of app that need others properties on message. Examples:

  • Add token usage on message
  • Add llm costs on message
  • Add model name on message
  • Add prompt on message
  • Add name of the assistant on message
  • Add avatar image of the assistant on message

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions