Skip to content

Commit f0aafbe

Browse files
authored
feat: expose the llm callable in the qa agent (#64)
1 parent 13ca608 commit f0aafbe

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

python/python/knowledge_graph/llm/llm_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ def create_llm_client(
3737
llm_model: str,
3838
llm_temperature: float,
3939
llm_options: Optional[Mapping[str, Any]] = None,
40+
llm_callable: Optional[Any] = None,
4041
) -> kg_extraction.LLMClient:
4142
resolved_options = dict(llm_options or {})
4243
return kg_extraction.get_llm_client(
44+
llm_callable=llm_callable,
4345
llm_model=llm_model,
4446
llm_temperature=llm_temperature,
4547
llm_options=resolved_options,

python/python/knowledge_graph/llm/qa.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ def ask_question(
3535
llm_temperature: float,
3636
llm_config_path,
3737
embedding_model: str | None,
38+
llm_callable=None,
3839
) -> str:
3940
client_options = load_llm_options(llm_config_path)
4041
llm_client = create_llm_client(
4142
llm_model=llm_model,
4243
llm_temperature=llm_temperature,
4344
llm_options=client_options,
45+
llm_callable=llm_callable,
4446
)
4547
embedding_generator = resolve_embedding_generator(
4648
model_name=embedding_model, options=client_options

0 commit comments

Comments
 (0)