langchain_community.chat_models.gpt_router
.completion_with_retry¶
- langchainCommunity.chat_models.gpt_router.completion_with_retry(llm: GPTRouter, models_priority_list: List[GPTRouterModel], run_manager: Optional[CallbackManagerForLLMRun] = None, **kwargs: Any) Union[GenerationResponse, Generator[ChunkedGenerationResponse, None, None]] [source]¶
使用tenacity重试完成调用。
- 参数
llm (GPTRouter) –
models_priority_list (List[GPTRouterModel]) –
run_manager (Optional[CallbackManagerForLLMRun]) –
kwargs (Any) –
- 返回类型
Union[GenerationResponse, Generator[ChunkedGenerationResponse, None, None]]