Use of **kwargs is deprecated, use engine_kwargs instead
时间: 2023-08-31 14:07:25 浏览: 141
【Python进阶】Word版,可自拓展知识点或写注记。
Thank you for letting me know. The use of `**kwargs` is deprecated in the context you mentioned, and the recommended alternative is to use `engine_kwargs` instead. This change allows you to pass engine-specific arguments to the underlying language model.
Here's an example of how you can update your code:
```python
# Old way using **kwargs
output = model.generate(..., **kwargs)
# New way using engine_kwargs
output = model.generate(..., engine_kwargs=kwargs)
```
By making this change, you should be able to resolve the deprecation warning and use the `engine_kwargs` parameter as intended.
阅读全文