Skip to content

LanguageModelExtraDataPart- arbitrary model-specific data in request #246994

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

Open
roblourens opened this issue Apr 20, 2025 · 0 comments
Open

LanguageModelExtraDataPart- arbitrary model-specific data in request #246994

roblourens opened this issue Apr 20, 2025 · 0 comments
Assignees
Milestone

Comments

@roblourens
Copy link
Member

We can build prompt cache checkpoints on top of this, and anything else in the future.

/**
 * A language model response part containing arbitrary model-specific data, returned from a {@link LanguageModelChatResponse}.
 * TODO@API naming, looking at LanguageModelChatRequestOptions.modelOptions, but LanguageModelModelData is not very good.
 * LanguageModelOpaqueData from prompt-tsx?
 */
export class LanguageModelExtraDataPart {
	/**
	 * The type of data. The allowed values and data types here are model-specific.
	 */
	kind: string;

	/**
	 * Extra model-specific data.
	 */
	data: any;

	/**
	 * Construct an extra data part with the given content.
	 * @param value The image content of the part.
	 */
	constructor(kind: string, data: any);
}
@roblourens roblourens added this to the April 2025 milestone Apr 20, 2025
@roblourens roblourens self-assigned this Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant