Hey! Thanks for reporting this. Will ping you here when we have an update for you
Thank you ! If you're able to point to me where to add those cost functions, I would love to contribute as well!
tagging the founding team here because this is impressive
thanks so much for contributing with the PR!
i didnt have time today to get to fixing the request drawer view of the claude request. will update here if i get around to it tonight, latest tmrw morning
hey , can you add me to your organization to help me debug?
my email is: scott@helicone.ai
HI This is an awesome PR! Thanks for submitting this
Ah for sure already added you
Just need to search for Model = "claude-instant-1.2" and it still result in error
ah ok - its on the page level, not on trying to view the request in the drawer. thanks!
Different error now seems like haha, I guess there should be some kind of type checking before calling .replace?
Anytime! Always love to help out open sourced project! Thanks for making my work easier too! haha
Ahh I see, thank you for the confirmation there!
interesting, I can view the requests in the table. but im getting the application error once I click on a row to open up the request
I think the error is from Completion component? there's a line that reads
{response && removeLeadingWhitespace(response.text)}
And the error I found in dev tools do shows it came from
removeLeadingWhitespace
as shown in the image. I search up that
.replace
in the whole codebase and can only find that.
Cuz I think truthy could means a lot of stuff in js, maybe change it to
function removeLeadingWhitespace(str: string | null): string {
if (typeof str !== "string") return "";
return str.replace(/^\s+/, ""); // Replace one or more whitespace characters at the beginning of the string with an empty string
}
Seems a bit safer than just checking if it's falsey?
what you think? If you think it's the root cause of the problem, I can shoot up another PR to fix it
im taking a look to see currently
the didnt seem to do the trick
hmm... return String(str).trim()
?
Ah that's why the str
variable is a damn object haha
wait, your fix worked. I was testing and left a faulty piece of code haha
going to cut a PR for that string check
Getting shit done eh? haha
Btw might wanna check what you pass along to Claude component though, cuz it seem it should be string? not the whole object? Not sure which of which is passed along the chain of component tho
Hey , just curious do you run Helicone locally?
Nope, I was planning to do that, but on the cloud works okay for our company for now
I mean when developing these changes*
Ah I just try to run that isolated piece of code, but no, haven't got the time to fully set it up
Makes sense! Very impressive nonetheless
If there's a more serious piece of code I'll be sure to run it all though! Thank you for being so quick about it tho! haha
no, thank you for literally pinpointing the errors and for cutting your own PR's haha
hahaha anytime! you guys just have such a great product, and I use it everytime at my work either, so might as well!
not a bother at all! we'll take a look this weekend. thanks for writing up so much for us to start with