completion_with_retry#
- langchain_community.chat_models.gpt_router.completion_with_retry(llm: GPTRouter, models_priority_list: List[GPTRouterModel], run_manager: CallbackManagerForLLMRun | None = None, **kwargs: Any) GenerationResponse | Generator[ChunkedGenerationResponse, None, None] [来源]#
使用tenacity重试完成调用。
- Parameters:
llm (GPTRouter)
models_priority_list (List[GPTRouterModel])
run_manager (可选[CallbackManagerForLLMRun])
kwargs (Any)
- Return type:
Union[GenerationResponse, Generator[ChunkedGenerationResponse, None, None]]