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

Schema export: publish chat history input types #270

Open
ncoghlan opened this issue Mar 11, 2025 · 1 comment
Open

Schema export: publish chat history input types #270

ncoghlan opened this issue Mar 11, 2025 · 1 comment

Comments

@ncoghlan
Copy link
Contributor

ncoghlan commented Mar 11, 2025

In addition to the chat history message format used to communicate with the LM Studio server, lmstudio-js also defines chat message formats that are more convenient for appending messages when using the SDK:

  • Simple text system prompt: {role: "system", content: "A text string"}
  • Simple text user messages: {role: "user", content: "A text string"}
  • User messages with attached image file handles: {role: "user", content: "A text string", images: [image_handle]}
  • Simple text assistant responses: {role: "assistant", content: "A text string"}

While some input-only types (such as the prediction config interfaces) are currently published as part of the schema export, these chat history input formats are not currently exported.

Exporting these types will reduce the potential for divergence between the dict formats accepted by lmstudio-python and those accepted by lmstudio-js.

@ncoghlan
Copy link
Contributor Author

For clarification, image_handle above refers to the ChatMessagePartFileData wire format, rather than to an internal file handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant