smrstep commited on
Commit
cd67c04
·
verified ·
1 Parent(s): 110cb4e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -45,16 +45,16 @@ As is, CARROT supports routing to the following collection of large language mod
45
  <p><strong>Example: Using CARROT for Routing</strong></p>
46
 
47
  ```python
48
- import carrot_router
49
 
50
  # Initialize the router
51
- router = carrot_router.Router()
52
 
53
  # Define a query
54
- query = "What are the latest advancements in AI?"
55
 
56
  # Get the best model for cost-performance tradeoff
57
- best_model = router.route(query)
58
 
59
  print(f"Recommended Model: {best_model}")
60
  ```
 
45
  <p><strong>Example: Using CARROT for Routing</strong></p>
46
 
47
  ```python
48
+ from carrot.py import CarrotRouter
49
 
50
  # Initialize the router
51
+ router = CarrotRouter(hf_token='YOUR_HF_TOKEN')
52
 
53
  # Define a query
54
+ query = ["What is the value of i^i?"]
55
 
56
  # Get the best model for cost-performance tradeoff
57
+ best_model = router.route(query, mu = 0.3)
58
 
59
  print(f"Recommended Model: {best_model}")
60
  ```