smrstep commited on
Commit
77fe375
·
verified ·
1 Parent(s): 9df9a1c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -1
README.md CHANGED
@@ -41,4 +41,20 @@ As is, CARROT supports routing to the following collection of large language mod
41
  | **Input Token Cost ($ per 1M tokens)** | 3 | 0.5 | 2.5 | 0.15 | 0.1 | 0.2 | 0.9 | 0.2 | 0.06 | 0.06 | 0.9 | 0.6 | 3.5 |
42
  | **Output Token Cost ($ per 1M tokens)** | 15 | 1.5 | 10 | 0.6 | 0.1 | 0.2 | 0.9 | 0.2 | 0.06 | 0.06 | 0.9 | 0.6 | 3.5 |
43
 
44
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  | **Input Token Cost ($ per 1M tokens)** | 3 | 0.5 | 2.5 | 0.15 | 0.1 | 0.2 | 0.9 | 0.2 | 0.06 | 0.06 | 0.9 | 0.6 | 3.5 |
42
  | **Output Token Cost ($ per 1M tokens)** | 15 | 1.5 | 10 | 0.6 | 0.1 | 0.2 | 0.9 | 0.2 | 0.06 | 0.06 | 0.9 | 0.6 | 3.5 |
43
 
44
+ <div class="p-4 bg-gray-100 rounded-lg shadow-md">
45
+ <p><strong>Example: Using CARROT for Routing</strong></p>
46
+ <pre><code class="language-python">
47
+ import carrot_router
48
+
49
+ # Initialize the router
50
+ router = carrot_router.Router()
51
+
52
+ # Define a query
53
+ query = "What are the latest advancements in AI?"
54
+
55
+ # Get the best model for cost-performance tradeoff
56
+ best_model = router.route(query)
57
+
58
+ print(f"Recommended Model: {best_model}")
59
+ </code></pre>
60
+ </div>