[FEATURE] Add AI-based /ask command (complementing #54) #56
|
@ -72,151 +72,145 @@ export async function preChecks() {
|
|||
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
async function getResponse(prompt: string, ctx: TextContext, replyGenerating: Message, model: string) {
|
||||
const Strings = getStrings(languageCode(ctx))
|
||||
|
||||
if (!ctx.chat) return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"success": false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"error": Strings.unexpectedErr.replace("{error}", "No chat found"),
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (!ctx.chat) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
success: false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
error: Strings.unexpectedErr.replace("{error}", "No chat found"),
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
|
||||
try {
|
||||
const aiResponse = await axios.post(`${process.env.ollamaApi}/api/generate`, {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
model: model,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
prompt: prompt,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
stream: true,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}, {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
responseType: "stream",
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
})
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const aiResponse = await axios.post(
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
`${process.env.ollamaApi}/api/generate`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
{
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
model,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
prompt,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
stream: true,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
},
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
{
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
responseType: "stream",
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
let fullResponse = ""
|
||||
![]() I'm not sure about what it does, but always prefer to use const whenever it's possible I'm not sure about what it does, but always prefer to use const whenever it's possible
![]() LLMs essentially stream their output, which is fetched through API (done above with the I used let because as the response comes in, LLMs essentially stream their output, which is fetched through API (done above with the `axios.post()`).
I used let because as the response comes in, `fullResponse` contains the latest complete response (it's live updating) which gets edited on Telegram. Hope this clears it up!
|
||||
let thoughts = ""
|
||||
let lastUpdate = Date.now()
|
||||
|
||||
for await (const chunk of aiResponse.data) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const stream = aiResponse.data
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
for await (const chunk of stream) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const lines = chunk.toString().split('\n')
|
||||
for (const line of lines) {
|
||||
if (!line.trim()) continue
|
||||
let ln = JSON.parse(line)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (model === thinking_model && ln.response.includes('<think>')) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const thinkMatch = ln.response.match(/<think>([\s\S]*?)<\/think>/)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (thinkMatch) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const innerContent = thinkMatch[1]
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (innerContent.trim().length > 0) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
logger.logThinking(ctx.chat.id, replyGenerating.message_id, true)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
logger.logThinking(ctx.chat.id, replyGenerating.message_id, true)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else if (model === thinking_model && ln.response.includes('</think>')) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
logger.logThinking(ctx.chat.id, replyGenerating.message_id, false)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
let ln
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
try {
|
||||
const now = Date.now()
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (ln.response) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (model === thinking_model) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
let patchedThoughts = ln.response
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
// TODO: hide blank thinking chunks
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const thinkTagRx = /<think>([\s\S]*?)<\/think>/g
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
patchedThoughts = patchedThoughts.replace(thinkTagRx, (match, p1) => {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (p1.trim().length > 0) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.log(p1)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return '`Thinking...`' + p1 + '`Finished thinking`'
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return ''
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
})
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
patchedThoughts = patchedThoughts.replace(/<think>/g, '`Thinking...`')
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
patchedThoughts = patchedThoughts.replace(/<\/think>/g, '`Finished thinking`')
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
thoughts += patchedThoughts
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
fullResponse += patchedThoughts
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
fullResponse += ln.response
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (now - lastUpdate >= 1000) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
await rateLimiter.editMessageWithRetry(
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx.chat.id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
replyGenerating.message_id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
thoughts,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
{ parse_mode: 'Markdown' }
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
lastUpdate = now
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ln = JSON.parse(line)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} catch (e) {
|
||||
console.error("[✨ AI | !] Error parsing chunk:", e)
|
||||
continue
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (model === thinking_model) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (ln.response.includes('<think>')) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const thinkMatch = ln.response.match(/<think>([\s\S]*?)<\/think>/)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (thinkMatch && thinkMatch[1].trim().length > 0) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
logger.logThinking(ctx.chat.id, replyGenerating.message_id, true)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else if (!thinkMatch) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
logger.logThinking(ctx.chat.id, replyGenerating.message_id, true)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else if (ln.response.includes('</think>')) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
logger.logThinking(ctx.chat.id, replyGenerating.message_id, false)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const now = Date.now()
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (ln.response) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (model === thinking_model) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
let patchedThoughts = ln.response
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const thinkTagRx = /<think>([\s\S]*?)<\/think>/g
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
patchedThoughts = patchedThoughts.replace(thinkTagRx, (match, p1) => p1.trim().length > 0 ? '`Thinking...`' + p1 + '`Finished thinking`' : '')
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
patchedThoughts = patchedThoughts.replace(/<think>/g, '`Thinking...`')
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
patchedThoughts = patchedThoughts.replace(/<\/think>/g, '`Finished thinking`')
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
thoughts += patchedThoughts
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
fullResponse += patchedThoughts
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
fullResponse += ln.response
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (now - lastUpdate >= 1000) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
await rateLimiter.editMessageWithRetry(
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx.chat.id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
replyGenerating.message_id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
thoughts,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
{ parse_mode: 'Markdown' }
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
lastUpdate = now
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
"success": true,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"response": fullResponse,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
success: true,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
response: fullResponse,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
} catch (error: any) {
|
||||
let shouldPullModel = false
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (error.response?.data?.error) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (error.response.data.error.includes(`model '${model}' not found`) || error.status === 404) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (error.response) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const errData = error.response.data?.error
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const errStatus = error.response.status
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (errData && (errData.includes(`model '${model}' not found`) || errStatus === 404)) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
shouldPullModel = true
|
||||
} else {
|
||||
console.error("[✨ AI | !] Error zone 1:", error.response.data.error)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"success": false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"error": error.response.data.error,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] Error zone 1:", errData)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return { success: false, error: errData }
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
} else if (error.status === 404) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
shouldPullModel = true
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else if (error.request) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] No response received:", error.request)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return { success: false, error: "No response received from server" }
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] Error zone 3:", error.message)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return { success: false, error: error.message }
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
|
||||
if (shouldPullModel) {
|
||||
ctx.telegram.editMessageText(ctx.chat.id, replyGenerating.message_id, undefined, `🔄 Pulling ${model} from ollama...\n\nThis may take a few minutes...`)
|
||||
console.log(`[✨ AI | i] Pulling ${model} from ollama...`)
|
||||
let pullModelStream: any
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
try {
|
||||
pullModelStream = await axios.post(`${process.env.ollamaApi}/api/pull`, {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
model: model,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
stream: false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
timeout: process.env.ollamaApiTimeout || 10000,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
})
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
await axios.post(
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
`${process.env.ollamaApi}/api/pull`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
{
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
model,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
stream: false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
timeout: process.env.ollamaApiTimeout || 10000,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} catch (e: any) {
|
||||
console.error("[✨ AI | !] Something went wrong:", e.response.data.error)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"success": false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"error": `❌ Something went wrong while pulling ${model}, please try your command again!`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (e.response) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] Something went wrong:", e.response.data?.error)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
success: false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
error: `❌ Something went wrong while pulling ${model}, please try your command again!`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else if (e.request) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] No response received while pulling:", e.request)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
success: false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
error: `❌ No response received while pulling ${model}, please try again!`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
} else {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] Error while pulling:", e.message)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
success: false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
error: `❌ Error while pulling ${model}: ${e.message}`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
}
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.log(`[✨ AI | i] ${model} pulled successfully`)
|
||||
return {
|
||||
"success": true,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"response": `✅ Pulled ${model} successfully, please retry the command.`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
success: true,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
response: `✅ Pulled ${model} successfully, please retry the command.`,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
}
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (error.response) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] Error zone 2:", error.response)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"success": false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"error": error.response,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (error.statusText) {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
console.error("[✨ AI | !] Error zone 3:", error.statusText)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"success": false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"error": error.statusText,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"success": false,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
"error": "An unexpected error occurred",
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,19 +218,16 @@ export default (bot: Telegraf<Context>) => {
|
|||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const botName = bot.botInfo?.first_name && bot.botInfo?.last_name ? `${bot.botInfo.first_name} ${bot.botInfo.last_name}` : "Kowalski"
|
||||
|
||||
bot.command(["ask", "think"], spamwatchMiddleware, async (ctx) => {
|
||||
if (!ctx.message || !('text' in ctx.message)) return;
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (!ctx.message || !('text' in ctx.message)) return
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const isAsk = ctx.message.text.startsWith("/ask")
|
||||
const model = isAsk ? flash_model : thinking_model
|
||||
const textCtx = ctx as TextContext;
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const textCtx = ctx as TextContext
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const reply_to_message_id = replyToMessageId(textCtx)
|
||||
const Strings = getStrings(languageCode(textCtx))
|
||||
const message = textCtx.message.text
|
||||
const author = ("@" + ctx.from?.username) || ctx.from?.first_name
|
||||
|
||||
logger.logCmdStart(
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
author,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
model === flash_model ? "ask" : "think"
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
logger.logCmdStart(author, model === flash_model ? "ask" : "think")
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
|
||||
if (!process.env.ollamaApi) {
|
||||
await ctx.reply(Strings.aiDisabled, {
|
||||
|
@ -251,7 +242,7 @@ export default (bot: Telegraf<Context>) => {
|
|||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
...({ reply_to_message_id })
|
||||
})
|
||||
|
||||
const fixedMsg = message.replace(/\/ask /, "").replace(/\/think /, "")
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const fixedMsg = message.replace(/\/(ask|think) /, "")
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (fixedMsg.length < 1) {
|
||||
await ctx.reply(Strings.askNoMessage, {
|
||||
parse_mode: 'Markdown',
|
||||
|
@ -273,8 +264,8 @@ ${fixedMsg}`)
|
|||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const aiResponse = await getResponse(prompt, textCtx, replyGenerating, model)
|
||||
if (!aiResponse) return
|
||||
|
||||
if (!ctx.chat) return
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (aiResponse.success && aiResponse.response) {
|
||||
if (!ctx.chat) return
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
await rateLimiter.editMessageWithRetry(
|
||||
ctx,
|
||||
ctx.chat.id,
|
||||
|
@ -282,16 +273,15 @@ ${fixedMsg}`)
|
|||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
aiResponse.response,
|
||||
{ parse_mode: 'Markdown' }
|
||||
)
|
||||
} else {
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
if (!ctx.chat) return
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
const error = Strings.unexpectedErr.replace("{error}", aiResponse.error)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
await rateLimiter.editMessageWithRetry(
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx.chat.id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
replyGenerating.message_id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
error,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
{ parse_mode: 'Markdown' }
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
return
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
}
|
||||
const error = Strings.unexpectedErr.replace("{error}", aiResponse.error)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
await rateLimiter.editMessageWithRetry(
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
ctx.chat.id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
replyGenerating.message_id,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
error,
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
{ parse_mode: 'Markdown' }
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
)
|
||||
![]() Don't use axios like this, check https://axios-http.com/docs/instance Don't use axios like this, check https://axios-http.com/docs/instance
![]() Why are you printing p1? Why are you printing p1?
![]() There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;) There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)
![]() I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read I like this idea! I will look into cleaning it up, and maybe break some things into functions so the code is easier to read
|
||||
})
|
||||
}
|
Don't use axios like this, check https://axios-http.com/docs/instance
Why are you printing p1?
There are too many ifs and elses, not only in this file but others too. Maybe we could separate them soon. let's try to do this in the future ;)