Deploying LLM Foundry Apps
You can use deploy LLM Foundry apps in internal projects as well as in client projects, in production.
How do I use the user's token in a front-end app?
You can use the Token API to get a token for the user.
This is explained in detail in the Single Page LLM Apps Workshop
Can I create my own tokens?
If you want to give your users their own tokens to use, use Registered Apps.
Send the email to s.anand@gramener.com, mentioning an app name you'll use. He will create a secret key for your app.
Then use this key to generate tokens for your users:
app_name = ... # Your app's unique name, e.g. `your-app-name`
secret_key = ... # Key provided by s.anand@gramener.com
email = ... # Your user's email ID
token = jwt.encode({"email": email}, secret_key, algorithm="HS256")