Class: LlmLib::HuggingFace

Inherits:
Object
  • Object
show all
Defined in:
lib/llm_lib/huggingface.rb

Class Method Summary collapse

Class Method Details

.send(apikey, model, query) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/llm_lib/huggingface.rb', line 3

def self.send(apikey, model, query)

    return LlmLib::Restclient.post(
        body: {
            "inputs" => query,

        },
        url: "https://api-inference.huggingface.co/models/#{model}",
        apikey: apikey
    )
end