LangChain.Providers.Huggingface (langchainex v0.2.3)

shared configuration for Huggingface API calls

Link to this section Summary

Functions

used by all the HF api calls, get the base URL and HTTP headers for a given model

finds the matching output format for this model/input and returns it as a string

finds the right input format for this model/input and returns it as a http request body in string form

Link to this section Functions

Link to this function

get_base(model)

used by all the HF api calls, get the base URL and HTTP headers for a given model

Link to this function

get_base_audio(model)

Link to this function

get_base_video(model)

Link to this function

get_model_for_action(action, model_name \\ nil)

Link to this function

get_template_body_for_action(model)

Link to this function

handle_generation(response)

Link to this function

handle_image_classification(list_of_id)

Link to this function

handle_response(model, response)

finds the matching output format for this model/input and returns it as a string

Link to this function

prepare_input(model, input)

finds the right input format for this model/input and returns it as a http request body in string form