Currently, to correctly send arguments for the model API, we need to do something like this:
for arg in ["temperature", "top_p"]:
if arg in self.config["model_args"]:
self.config["model_args"][arg] = float(self.config["model_args"][arg])
for arg in ["max_tokens", "top_k", "seed"]:
if arg in self.config["model_args"]:
self.config["model_args"][arg] = int(self.config["model_args"][arg])
It would be better to try guessing the value from its format, e.g. 0.01 is probably a float, 5 is a an int, etc.
That would allow us to send even unfamiliar parameters in a correct format.
Currently, to correctly send arguments for the model API, we need to do something like this:
It would be better to try guessing the value from its format, e.g.
0.01
is probably a float,5
is a an int, etc.That would allow us to send even unfamiliar parameters in a correct format.