Skip to content

Commit

Permalink
fix: hf move params to parameter, add note
Browse files Browse the repository at this point in the history
  • Loading branch information
gsuuon committed Dec 10, 2023
1 parent 26eb528 commit 4c6d7f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/model/providers/huggingface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local provider_util = require('model.providers.util')
local M = {}

---@param handlers StreamHandlers
---@param params? any Additional params for request
---@param params? any Additional params for request. Note the parameters detailed at https://huggingface.co/docs/api-inference/detailed_parameters need to go in the `params.parameters` field.
---@param options? { model?: string }
function M.request_completion(handlers, params, options)
local model = (options or {}).model or 'bigscience/bloom'
Expand Down Expand Up @@ -61,7 +61,9 @@ M.default_prompt = {
model = 'bigscience/bloom'
},
params = {
return_full_text = false
parameters = {
return_full_text = false
}
},
builder = function(input)
return { inputs = input }
Expand Down

0 comments on commit 4c6d7f0

Please sign in to comment.