Skip to content

Commit

Permalink
Bugfix: register the llm as an action param when the LLMRails app is …
Browse files Browse the repository at this point in the history
…created with a given llm attribute
  • Loading branch information
trebedea committed Sep 15, 2023
1 parent 92a478d commit ee972d6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nemoguardrails/rails/llm/llmrails.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,12 @@ def _init_llms(self):
is to allow for flexibility in using specialized LLM engines for specific actions.
"""

# If we already have a pre-configured one, we do nothing.
# If we already have a pre-configured one,
# we just need to register the LLM as an action param.
if self.llm is not None:
self.runtime.register_action_param("llm", self.llm)
return

# TODO: Currently we assume the first model is the main one. Add proper support
# to search for the main model config.

for llm_config in self.config.models:
if llm_config.type == "embeddings":
pass
Expand Down

0 comments on commit ee972d6

Please sign in to comment.