Comments (4)
The issue is that no OPENAI_API_KEY
environment variable is defined. You are probably setting the API key directly in the openai python package. LLM providers are detected by chainlit though specific environment variables.
from docs.
Thanks @willydouhard that fixed the issue.
I was setting my openai key in the code but not as an environment variable.
export OPENAI_API_KEY='<my api key>'
fixed it
from docs.
I have a similar problem, how to set the environment variables which chainlit though specific ??
If I set the .env file(include the OPENAI_API_KEY and OPENAI_API_BASE), there is no this problem.
But I want to use it with the config, should I set the user_env = [] in chainlit config file ?
what is the format with user_env ? Is there a example?
from docs.
User env is useful to require one OPENAI_API_KEY per user. You should use it if you want your user to pay their openai consumption individually.
If you just want to setup a global OPENAI_API_KEY for all of your users, just add it in a .env
file.
from docs.
Related Issues (20)
- Loader not working with cl.sleep HOT 1
- AttributeError: 'dict' object has no attribute 'to_openai' HOT 2
- Issue on docs
- Issue on docs
- Issue on docs
- Issue on docs
- Issue on integrating chat resume. HOT 13
- Issue on docs HOT 3
- Minor enhancement of the LangChain integration docs
- Issue on docs HOT 1
- Elements: Not showing as docs describe it HOT 3
- Issue on docs HOT 1
- "Prompt Playground error: No LLM provider available" HOT 4
- Issue on docs HOT 1
- sample code for react custom frontend with document attachment facility
- Render deployment link broken HOT 2
- Issue on docs HOT 1
- Chainlit deployment for multiple worker in production
- Issue on docs - You need to configure at least an on_chat_start or an on_message callback HOT 2
- Issue on docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.