mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
server: add warning message for deprecated context field (#7878)
This commit is contained in:
parent
5f8051180e
commit
d543b282a7
2 changed files with 2 additions and 1 deletions
|
@ -251,6 +251,7 @@ func (s *Server) GenerateHandler(c *gin.Context) {
|
|||
|
||||
var b bytes.Buffer
|
||||
if req.Context != nil {
|
||||
slog.Warn("the context field is deprecated and will be removed in a future version of Ollama")
|
||||
s, err := r.Detokenize(c.Request.Context(), req.Context)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue