Description Usage Arguments Value Examples
Instantiates and returns a Basilica connection tied to a specific auth key and server. It also populates a global 'basilica_connection' that is a copy of the returned connection. If a 'conn' argument is not passed to an 'embed_*' function, this global connection will be used.
1 |
auth_key |
Basilica API key |
server |
Basilica server to point to (Default: 'https://api.basilica.ai') |
environment
1 2 3 4 5 6 | conn <- connect("SLOW_DEMO_KEY") # Create a connection to pass to functions
embeddings <- embed_sentences(c("hello world"), conn=conn)
connect("SLOW_DEMO_KEY") # Populate the global connection
embeddings <- embed_sentences(c("hello world"))
embeddings <- embed_sentences(c("hello world")) # Will both use the same global connection
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.