Skip to content

Extend model calls

Chamath K.B. Attanayaka edited this page Aug 3, 2023 · 1 revision

Use following example to invoke unavailable models from huggingface.

class HuggingfaceApiClient

    def initialize(api_key)
        @api_key = api_key
    end

    def hugging_dolly2_call(query, model = "databricks/dolly-v2-12b")
        response = HuggingFace.send(@api_key,
                                model,
                                query 
                                )
        response
    end
end

require 'llm_lib/huggingface'
Clone this wiki locally