-
Notifications
You must be signed in to change notification settings - Fork 61
Separate Partner and Bot Configs #859
Comments
@whilefoo This was originally your idea, pls check the description |
As someone who doesn't have an extremely in depth understanding of all of the internals it would be good to have that clarified better because you mentioned Whichever config holds the least properties I assume would be bot config so something like: module.exports = {
log: {
logEnvironment: process.env.LOG_ENVIRONMENT || "production",
level: (process.env.LOG_LEVEL as LogLevel) || LogLevel.DEBUG,
retryLimit: Number(process.env.LOG_RETRY) || 0,
},
supabase: {
url: process.env.SUPABASE_URL ?? "",
key: process.env.SUPABASE_KEY ?? "",
},
telegram: {
token: process.env.TELEGRAM_BOT_TOKEN ?? "",
delay: process.env.TELEGRAM_BOT_DELAY ? Number(process.env.TELEGRAM_BOT_DELAY) : botDelay,
},
logNotification: {
url: process.env.LOG_WEBHOOK_BOT_URL || "",
secret: process.env.LOG_WEBHOOK_SECRET || "",
groupId: Number(process.env.LOG_WEBHOOK_GROUP_ID) || 0,
topicId: Number(process.env.LOG_WEBHOOK_TOPIC_ID) || 0,
enabled: true,
},
}; Since the AI features are optional that would be partner specific? or being an AI powered repo manager would that be a bot level config item? Also we need a uniform way to read the OpenAi API key as Also the readme states that the api key should be set in |
You're right, it is partner specific, my mistake, updated the issue description.
If a config param is read from a yml file (example) then it is considered to be a partner config. If a config param is read only from an env variable (example) then it is considered to be the bot's param (i.e. not partner specific param).
Right now we have only 2 AI related config params (openAIKey and openAITokenLimit) both of which are partner specific.
I think that partner specific openai API params should be used both for
|
/start |
Too many assigned issues, you have reached your max of 2 |
@Keyrxng There is a huge refactor coming so it makes sense to wait for that PR and then solve the current issue |
+ Evaluating results. Please wait... |
@pavlovcik the deadline is at 2024-02-17T14:34:20.960Z |
+ Evaluating results. Please wait... |
Depends on #644
Check this js config object. It consists of the following param categories:
price.baseMultiplier, assign.bountyHunterMax, etc...
) which are set in the partners' bot yml configs (example)process.env.SUPABASE_URL, process.env.X25519_PRIVATE_KEY, etc...
) which are taken from env variables and are related solely to the bot's running instance (i.e. not to partner projects)We should separate this js config object in 2 different js configs (partner params and bot env params) so that they don't intermingle.
What should be done:
README.md
with relevant config param descriptionsThe text was updated successfully, but these errors were encountered: