refactor(http-textmodel): unwrap Result.Text from Backend calls
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
52f27fc476
commit
44e063c1fa
1 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ func (m *HTTPTextModel) Generate(ctx context.Context, prompt string, opts ...inf
|
|||
return
|
||||
}
|
||||
m.lastErr = nil
|
||||
yield(inference.Token{Text: result})
|
||||
yield(inference.Token{Text: result.Text})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ func (m *HTTPTextModel) Chat(ctx context.Context, messages []inference.Message,
|
|||
return
|
||||
}
|
||||
m.lastErr = nil
|
||||
yield(inference.Token{Text: result})
|
||||
yield(inference.Token{Text: result.Text})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue