Schemas
Last updated
Last updated
note: If you are using a Devii API, these docs do not pertain to you. Devii produces a unique schema for each user dependent on the access-token so we just use that at runtime
Api Schemas are foundationally how the Natural Language API knows how to interact with your api and when. The intention is for you add uploading your schema to the NLAPI as apart of your deployment pipeline. If you have mulitple schemas for your application, give each schema a unique name and the NLAPI will have access to all schemas. If you upload a schema with the same name of one we have, we will replace it with the latest version.
To update your schema send us a file to this post route: /portal/schemas
. If you haven't created an application yet, please see .
This is a multipart/form-data
endpoint that accepts binary type file
key value.
Example Request:
NOTE: Depending on the file size, this could take up to a couple of minutes to process and be 'live' through the NLAPI, The NLAPI will continue to use the previous schema until the new one is processed to prevent any downtime
For OpenAPI schemas add the tag 'no-nlapi' to your route and we will not process it. Common routes that our developer community hides are /login
/signup
or anything where the user would have to provide sensitive information like access tokens.
Applications:
Python:
Ruby:
Q: Can I have more than one schema per application?
A: Yes! By passing in the name
field in the body of your request when uploading a schema, we will make sure that schema overrides the schema with the same name in that application. So if you have two schemas with different names, the NLAPI will have access to both of the latest versions of those at run time. Note -> Currently both schemas have to have the same base url.
Q: How are schemas used in enterprise applications?
A: For enterprise applications, schemas can be used to train a private model to increase accuracy for your specific application and user requests.
Q: Can I hide routes I don't want the NLAPI to use?
A: (OpenApi Users) Yes! If you are using an OpenAPI spec, use the tag no-nlapi in your definition and we will drop that endpoint when processing so the LLM doesn't see it exists. Note -> LLMs are still relatively unpredictable so if your user asks for a specific endpoint or a task that the endpoint would be relatively predictable, it's plausible that the LLM will still attempt to make an api call to an endpoint it doesn't know about. -> If you need extra constraints please reach out and we can ensure the LLM doesn't call any other endpoints than what you have given access to. -> The tradeoff is a little speed.
A: (Devii Users) If you are using Devii, the graphql your logged in user has access to from your policy will be the only actions the LLM sees to take action on the user's behalf. Currently there is not a way to seperate what the LLM can do on the user's behalf vs the user directly in the API.
Q: Can I use the NLAPI if I'm not using an Open API schema or Devii?
A: Potentially, to see how we can support you, please email jase@jasekraft.com
You are all set up. Now go to the main to get started using the NLAPI!