File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767from ..stdlib .components import Intrinsic , Message
6868from ..stdlib .requirements import ALoraRequirement , LLMaJRequirement
6969from ..telemetry .context import generate_request_id , with_context
70- from .adapters import (
71- AdapterMixin ,
72- IntrinsicAdapter ,
73- LocalHFAdapter ,
74- get_adapter_for_intrinsic ,
75- )
70+ from .adapters import AdapterMixin , IntrinsicAdapter , LocalHFAdapter
7671from .backend import FormatterBackend
7772from .cache import Cache , SimpleLRUCache
7873from .model_ids import ModelIdentifier
@@ -587,9 +582,8 @@ async def _generate_from_intrinsic(
587582
588583 docs = messages_to_docs (ctx_as_message_list )
589584
590- adapter = get_adapter_for_intrinsic (
591- action .intrinsic_name , action .adapter_types , self ._added_adapters
592- )
585+ allowed_types = tuple (at .value for at in action .adapter_types )
586+ adapter = self ._find_adapter (action .intrinsic_name , allowed_types )
593587 if adapter is None :
594588 raise ValueError (
595589 f"backend ({ self } ) has no adapter for processing intrinsic: { action .intrinsic_name } "
You can’t perform that action at this time.
0 commit comments