mirror of
https://github.com/ollama/ollama.git
synced 2026-04-23 17:29:54 +02:00
log probs working
This commit is contained in:
17
api/types.go
17
api/types.go
@@ -189,11 +189,12 @@ func (t *ToolFunction) String() string {
|
||||
// ChatResponse is the response returned by [Client.Chat]. Its fields are
|
||||
// similar to [GenerateResponse].
|
||||
type ChatResponse struct {
|
||||
Model string `json:"model"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Message Message `json:"message"`
|
||||
DoneReason string `json:"done_reason,omitempty"`
|
||||
Logits []float32 `json:"logits"`
|
||||
Model string `json:"model"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Message Message `json:"message"`
|
||||
DoneReason string `json:"done_reason,omitempty"`
|
||||
Logits []float32 `json:"logits"`
|
||||
TopLogprobs []TokenLogprob `json:"top_logprobs"`
|
||||
|
||||
Done bool `json:"done"`
|
||||
|
||||
@@ -210,14 +211,10 @@ type Metrics struct {
|
||||
}
|
||||
|
||||
type TokenLogprob struct {
|
||||
Token string `json:"token"`
|
||||
Text string `json:"text"`
|
||||
Logprob float32 `json:"logprob"`
|
||||
}
|
||||
|
||||
type LogProbs struct {
|
||||
TopLogprobs []TokenLogprob `json:"top_logprobs"`
|
||||
}
|
||||
|
||||
// Options specified in [GenerateRequest]. If you add a new option here, also
|
||||
// add it to the API docs.
|
||||
type Options struct {
|
||||
|
||||
Reference in New Issue
Block a user