@@ -30,7 +30,7 @@ class SamplingParameters(BaseModel):
3030# top_p: the top_p to use for the completion.
3131 top_p : float = Field (default = 0.0 )
3232# top_k: the top_k to use for the completion.
33- top_k : float = Field (default = 0.0 )
33+ top_k : typing . Optional [ float ] = Field (default = 0.0 )
3434# max_new_tokens: the max_new_tokens to use for the completion.
3535 max_new_tokens : int = Field (default = 0 )
3636# do_sample: whether to do sample for the completion.
@@ -47,25 +47,25 @@ class ChatCompletionRequest(BaseModel):
4747# messages: the messages to generate completions for.
4848 messages : typing .List [ChatMessage ] = Field (default_factory = list )
4949# seed: the seed to use for the completion.
50- seed : int = Field (default = 0 )
50+ seed : typing . Optional [ int ] = Field (default = 0 )
5151# task: the task to generate completions for (e.g. "InferenceTask").
52- task : str = Field (default = "" )
52+ task : typing . Optional [ str ] = Field (default = "" )
5353# model: the LLM name to use for the completion. (optional, suggest leaving this empty as not all LLMs are supported)
54- model : str = Field (default = "" )
54+ model : typing . Optional [ str ] = Field (default = "" )
5555# test_time_inference: whether to use test time inference.
56- test_time_inference : bool = Field (default = False )
56+ test_time_inference : typing . Optional [ bool ] = Field (default = False )
5757# mixture: whether to use a mixture of miners to create a slower but better answer.
58- mixture : bool = Field (default = False )
58+ mixture : typing . Optional [ bool ] = Field (default = False )
5959# sampling_parameters: the sampling parameters to use for the completion.
60- sampling_parameters : SamplingParameters = Field (default_factory = SamplingParameters )
60+ sampling_parameters : typing . Optional [ SamplingParameters ] = Field (default_factory = SamplingParameters )
6161# inference_mode: the inference mode to use for the completion.
62- inference_mode : str = Field (default = "" )
62+ inference_mode : typing . Optional [ str ] = Field (default = "" )
6363# json_format: whether to use JSON format for the completion.
64- json_format : bool = Field (default = False )
64+ json_format : typing . Optional [ bool ] = Field (default = False )
6565# stream: whether to stream the completion.
66- stream : bool = Field (default = False )
66+ stream : typing . Optional [ bool ] = Field (default = False )
6767# timeout: the timeout for the completion in seconds.
68- timeout : int = Field (default = 0 )
68+ timeout : typing . Optional [ int ] = Field (default = 0 )
6969
7070class TopLogprob (BaseModel ):
7171 """
@@ -372,13 +372,13 @@ class WebRetrievalRequest(BaseModel):
372372# search_query: the search query.
373373 search_query : str = Field (default = "" )
374374# n_miners: the number of miners to use for the query.
375- n_miners : int = Field (default = 0 )
375+ n_miners : typing . Optional [ int ] = Field (default = 0 )
376376# n_results: the number of results to return.
377- n_results : int = Field (default = 0 )
377+ n_results : typing . Optional [ int ] = Field (default = 0 )
378378# max_response_time: the max response time to allow for the miners to respond in seconds.
379- max_response_time : int = Field (default = 0 )
379+ max_response_time : typing . Optional [ int ] = Field (default = 0 )
380380# timeout: the timeout for the web retrieval in seconds.
381- timeout : int = Field (default = 0 )
381+ timeout : typing . Optional [ int ] = Field (default = 0 )
382382
383383class WebSearchResult (BaseModel ):
384384 """
0 commit comments