Skip to content
Snippets Groups Projects
Unverified Commit 98052cb3 authored by James Briggs's avatar James Briggs Committed by GitHub
Browse files

Merge pull request #51 from aurelio-labs/jamescalam-patch-1

Update README to show latest syntax
parents b168b2d4 8f550141
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ chitchat = Route( ...@@ -52,7 +52,7 @@ chitchat = Route(
) )
# we place both of our decisions together into single list # we place both of our decisions together into single list
decisions = [politics, chitchat] routes = [politics, chitchat]
``` ```
We have our decisions ready, now we initialize an embedding / encoder model. We currently support a `CohereEncoder` and `OpenAIEncoder` — more encoders will be added soon. To initialize them we do: We have our decisions ready, now we initialize an embedding / encoder model. We currently support a `CohereEncoder` and `OpenAIEncoder` — more encoders will be added soon. To initialize them we do:
...@@ -75,7 +75,7 @@ With our `decisions` and `encoder` defined we now create a `DecisionLayer`. The ...@@ -75,7 +75,7 @@ With our `decisions` and `encoder` defined we now create a `DecisionLayer`. The
```python ```python
from semantic_router.layer import RouteLayer from semantic_router.layer import RouteLayer
dl = RouteLayer(encoder=encoder, decisions=decisions) dl = RouteLayer(encoder=encoder, routes=routes)
``` ```
We can now use our decision layer to make super fast decisions based on user queries. Let's try with two queries that should trigger our decisions: We can now use our decision layer to make super fast decisions based on user queries. Let's try with two queries that should trigger our decisions:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment