hnishi / simple-ai-slack-bot

Simple Slack bot powered by OpenAI Chat API
1 stars 0 forks source link

Fix env sample #30

Closed hnishi closed 1 year ago

hnishi commented 1 year ago

Summary by CodeRabbit

github-actions[bot] commented 1 year ago

Image description CodeRabbit

Walkthrough

The changes primarily focus on enhancing the configuration of the application by introducing environment variables for model selection and organization. The MODEL_NAME and OPENAI_ORGANIZATION are now configurable, with the former influencing the MODEL_MAX_TOKEN_LENGTH. The README and sample environment files have been updated to reflect these changes.

Changes

File(s) Summary
.env.sample, README.md Removed export keyword from environment variable assignments in shell script. Added new environment variables MODEL_NAME and OPENAI_ORGANIZATION. Updated README to reflect these changes.
configuration.py Introduced dynamic setting of MODEL_NAME and MODEL_MAX_TOKEN_LENGTH based on environment variables. An error is raised if an unknown model name is provided.

🐰 "In the land of code, where logic intertwines,

Changes come forth, as bright as sunshine.

With models named and tokens counted,

Our app's flexibility has just been mounted!

So hop along, let's celebrate this day,

For our code just got a better way!" 🎉


Uplevel your code reviews with CodeRabbit Pro ### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.