fix HfApiModel usage example
This commit is contained in:
		
							parent
							
								
									5991206ae5
								
							
						
					
					
						commit
						8760f50f8e
					
				|  | @ -206,12 +206,11 @@ class HfApiModel(Model): | ||||||
|     Example: |     Example: | ||||||
|     ```python |     ```python | ||||||
|     >>> engine = HfApiModel( |     >>> engine = HfApiModel( | ||||||
|     ...     model="Qwen/Qwen2.5-Coder-32B-Instruct", |     ...     model_id="Qwen/Qwen2.5-Coder-32B-Instruct", | ||||||
|     ...     token="your_hf_token_here", |     ...     token="your_hf_token_here", | ||||||
|     ...     max_tokens=2000 |  | ||||||
|     ... ) |     ... ) | ||||||
|     >>> messages = [{"role": "user", "content": "Explain quantum mechanics in simple terms."}] |     >>> messages = [{"role": "user", "content": "Explain quantum mechanics in simple terms."}] | ||||||
|     >>> response = engine(messages, stop_sequences=["END"]) |     >>> response = engine(messages, stop_sequences=["END"], max_tokens=1500) | ||||||
|     >>> print(response) |     >>> print(response) | ||||||
|     "Quantum mechanics is the branch of physics that studies..." |     "Quantum mechanics is the branch of physics that studies..." | ||||||
|     ``` |     ``` | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue