Galileo
Search
K

Package

Subpackages

Submodules

promptquality.callback module

class GalileoPromptCallback(project_name=None, run_name=None, scorers=None, config=None, **kwargs)

Bases: BaseCallbackHandler
LangChain callbackbander for logging prompts to Galileo.
  • Parameters: project_name (str) – Name of the project to log to

set_relationships(run_id, node_type, parent_run_id=None)

  • Return type: None

get_root_id(run_id)

  • Return type: UUID

mark_step_start(run_id, serialized, prompt=None, **kwargs)

  • Return type: None

mark_step_end(run_id, response=None, **kwargs)

  • Return type: None

on_llm_start(serialized, prompts, *, run_id, parent_run_id=None, **kwargs)

Run when LLM starts running.
  • Return type: Any

on_chat_model_start(serialized, messages, *, run_id, parent_run_id=None, **kwargs)

Run when Chat Model starts running.
  • Return type: Any

on_llm_end(response, *, run_id, parent_run_id=None, **kwargs)

Run when LLM ends running.
  • Return type: Any

on_llm_error(error, *, run_id, parent_run_id=None, **kwargs)

Run when LLM errors.
  • Return type: Any

on_chain_start(serialized, inputs, *, run_id, parent_run_id=None, **kwargs)

Run when chain starts running.
  • Return type: Any

on_chain_end(outputs, *, run_id, parent_run_id=None, **kwargs)

Run when chain ends running.
  • Return type: Any

on_chain_error(error, *, run_id, parent_run_id=None, **kwargs)

Run when chain errors.
  • Return type: Any

finish()

  • Return type: None

promptquality.chain_run module

chain_run(rows, project_name=None, run_name=None, scorers=None, silent=False, config=None)

  • Return type: None

promptquality.get_metrics module