genai.extensions.huggingface package

Extension for transformers library

class genai.extensions.huggingface.IBMGenAIAgent[source]

Bases: Agent

__init__(client, model=None, parameters=None, chat_prompt_template=None, run_prompt_template=None, additional_tools=None)[source]
Parameters:
  • client (Client)

  • model (str | None)

  • parameters (TextGenerationParameters | None)

  • chat_prompt_template (str | None)

  • run_prompt_template (str | None)

  • additional_tools (list[str] | None)

generate_many(prompts, stop=None)[source]
Parameters:
  • prompts (list[str])

  • stop (list[str] | None)

generate_one(prompt, stop=None)[source]
Parameters:
  • prompt (str)

  • stop (list[str] | None)

Submodules