Add context tracking
This commit is contained in:
@@ -249,10 +249,19 @@ func (m *Message) UnmarshalJSON(data []byte) error {
|
||||
|
||||
// Model represents an available model from the API.
|
||||
type Model struct {
|
||||
ID string `json:"id"`
|
||||
Created int64 `json:"created"`
|
||||
Object string `json:"object"`
|
||||
OwnedBy string `json:"owned_by"`
|
||||
ID string `json:"id"`
|
||||
Created int64 `json:"created"`
|
||||
Object string `json:"object"`
|
||||
OwnedBy string `json:"owned_by"`
|
||||
Meta *ModelMeta `json:"meta,omitempty"`
|
||||
}
|
||||
|
||||
// ModelMeta contains optional model metadata from the provider.
|
||||
// llama.cpp includes n_ctx (configured context size) and
|
||||
// n_ctx_train (model's native training context).
|
||||
type ModelMeta struct {
|
||||
NCtx int `json:"n_ctx,omitempty"`
|
||||
NCtxTrain int `json:"n_ctx_train,omitempty"`
|
||||
}
|
||||
|
||||
// ModelsResponse is the response for GET /models.
|
||||
|
||||
Reference in New Issue
Block a user