Skip to content

Add support for string content in messages #295

Open
@ricardog

Description

@ricardog

Some local servers (like ml-explore/ mlx_lm server) which are based on huggingface / transformers don't seem to support message where content has a type and "data".

For example the following generates an error

{
   "messages": [
      {
         "role": "user",
         "content": [
            {
               "type": "text",
               "text": "who is mickey mouse?"
            }
         ]
      }
   ]
}

While this format works

{
   "messages": [
      {
         "role": "user",
         "content":  "who is mickey mouse?"
      }
   ]
}

Is it possible to have chatgpt-shell use the simpler format?

See for example 1195.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions