Deploy your customized AI assistants
insertAssistant
mutation or by using the dashboard. For instance:
GetMoviesWithScoreHigherThan
, which will allow the AI Assistant to query movies based on their score.SearchMovies
, which leverages auto-embeddings and will allow the AI Assistant to query movies using natural language.InsertMovie
, which will let the AI Assistant to insert new movies directly into the database.answer_deep_questions
, which is a serverless function that can respond to deep questions about life and the universe.startSession
and pass the id of the assistant you want to use. For instance, to start a session using the assistant we created in the previous section:
prevMessageID
is used to only return messages after this one. As this is the beginning of the conversation we send an empty string to get all messages back. After executing that mutation we should receive a response like:
answer_deep_questions
so this is roughly what happened:
prevMessageID
:
GetMoviesWithScoreHigherThan
so it requested graphite to run the query and return the data. This is what happened:
SearchMovies
, which leverages auto-embeddings to perform searches using natural language.InsertMovie
to add it to the database.graphite.assistants
and graphite.sessions
will be made available. The purpose of this metadata is to allow you to set permissions as with any other object in your project. For details on which permissions are needed for each specific query and mutation refer to the GraphQL documentation in the reference section.