server: add warning message for deprecated context field (#7878)

This commit is contained in:
Jeffrey Morgan
2024-11-30 14:05:50 -08:00
committed by GitHub
parent 5f8051180e
commit d543b282a7
2 changed files with 2 additions and 1 deletions

View File

@ -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()})