mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Expose model description
This commit is contained in:
1 file changed
+5
@@ -10,6 +10,7 @@ interface ProviderModel {
|
||||
name: string;
|
||||
provider: string;
|
||||
fullId: string; // provider/model format
|
||||
description?: string;
|
||||
/** Maximum size of context window, if available */
|
||||
contextLength?: number;
|
||||
/** Pricing information, if available */
|
||||
@@ -62,6 +63,10 @@ export function useProviderModels(): ModelFetchResult {
|
||||
fullId: `${providerKey}/${model.id}`,
|
||||
};
|
||||
|
||||
if ('description' in model && typeof model.description === 'string') {
|
||||
providerModel.description = model.description;
|
||||
}
|
||||
|
||||
if ('context_length' in model && typeof model.context_length === 'number') {
|
||||
providerModel.contextLength = model.context_length;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user