TypeChat icon indicating copy to clipboard operation
TypeChat copied to clipboard

Add example of `.env` file

Open pacexy opened this issue 2 years ago • 5 comments

This will make it easier for users to set up environment variables.

pacexy avatar Jul 25 '23 23:07 pacexy

目前代码里是按是否有相应配置来决定要使用OpenAI还是Azure的,并且在检测到有OpenAI的配置会直接使用OpenAI的API尝试,所以如果只是添加用例可能把几行都默认为注释状态比较好~ In the createLanguageModel process, which endpoint to use is determined by whether there is a corresponding configuration to them. It will try to get OpenAI env variable first, once it get the OPENAI_API_KEY, it will use OpenAI as endpoint. Therefore, it may be better to comment all those lines as the default state~

lingchuL avatar Jul 25 '23 23:07 lingchuL

目前代码里是按是否有相应配置来决定要使用OpenAI还是Azure的,并且在检测到有OpenAI的配置会直接使用OpenAI的API尝试,所以如果只是添加用例可能把几行都默认为注释状态比较好~ In the createLanguageModel process, which endpoint to use is determined by whether there is a corresponding configuration to them. It will try to get OpenAI env variable first, once it get the OPENAI_API_KEY, it will use OpenAI as endpoint. Therefore, it may be better to comment all those lines as the default state~

Maybe we can just keep it empty? (e.g. OPENAI_API_KEY=), and then it will not affect the createLanguageModel.

pacexy avatar Jul 26 '23 00:07 pacexy

Yeah, it works too.

lingchuL avatar Jul 26 '23 00:07 lingchuL

You don't normally include the "" quotes in .env.example files. empty is better

Stevenic avatar Aug 09 '23 19:08 Stevenic

You don't normally include the "" quotes in .env.example files. empty is better

Updated.

pacexy avatar Oct 18 '23 22:10 pacexy