connect: connect

Description Usage Arguments Value Examples

Description

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.

Usage

1
connect(auth_key = character(), server = character())

Arguments

auth_key

Basilica API key

server

Basilica server to point to (Default: 'https://api.basilica.ai')

Value

environment

Examples

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

basilica-ai/basilica-R-client documentation built on June 8, 2019, 10:32 a.m.