File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ export OPENAI_API_KEY='sk-...'
5757$Env:OPENAI_API_KEY='sk-...'
5858```
5959
60+ Other official enviroment variables supported are: ` OPENAI_ADMIN_KEY ` , ` OPENAI_ORG_ID ` , ` OPENAI_PROJECT_ID `
61+
6062- Visit [ examples] ( https://github.com/64bit/async-openai/tree/main/examples ) directory on how to use ` async-openai ` .
6163- Visit [ docs.rs/async-openai] ( https://docs.rs/async-openai ) for docs.
6264
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ impl Default for OpenAIConfig {
7979 } )
8080 . unwrap_or_default ( )
8181 . into ( ) ,
82- org_id : Default :: default ( ) ,
83- project_id : Default :: default ( ) ,
82+ org_id : std :: env :: var ( "OPENAI_ORG_ID" ) . unwrap_or_default ( ) ,
83+ project_id : std :: env :: var ( "OPENAI_PROJECT_ID" ) . unwrap_or_default ( ) ,
8484 custom_headers : HeaderMap :: new ( ) ,
8585 }
8686 }
You can’t perform that action at this time.
0 commit comments