mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[Feature] add mm token usage (#4570)
* add mm token usage * fix unit test * fix unit test * fix unit test * fix model path * fix unit test * fix unit test * fix unit test * remove uncomment * change var name * fix code style * fix code style * fix code style * fix code style * fix unit test
This commit is contained in:
@@ -50,7 +50,7 @@ class MockTask:
|
||||
def get(self, key: str, default_value=None):
|
||||
if hasattr(self, key):
|
||||
return getattr(self, key)
|
||||
elif hasattr(self.sampling_params, key):
|
||||
elif hasattr(self, "sampling_params") and hasattr(self.sampling_params, key):
|
||||
return getattr(self.sampling_params, key)
|
||||
else:
|
||||
return default_value
|
||||
|
||||
Reference in New Issue
Block a user