Helicone Community Page

Updated 4 months ago

Anthropic request breaks the web

Actually I've reported it in github already with issue #909 (https://github.com/Helicone/helicone/issues/909).

If there's any way I can help fixing it I would love to as well!
a
f
J
46 comments
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!
Hey there I've made a PR https://github.com/Helicone/helicone/pull/928. Can you take a look at it?
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
lgtm - merged!
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?
Attachment
image.png
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
Plain Text
{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.
Attachment
image.png
Cuz I think truthy could means a lot of stuff in js, maybe change it to
Plain Text
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
testing some stuff
I see, thank you btw !
the didnt seem to do the trick
hmm... return String(str).trim()?
Ah that's why the str variable is a damn object haha
Attachment
image.png
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!
LETS GO! πŸ’ͺπŸ’ͺ
Heya sorry to bother again, got another issue, I suppose I'll just pop it in here as it is related. https://github.com/Helicone/helicone/issues/937

Is it anyting related to the worker?
not a bother at all! we'll take a look this weekend. thanks for writing up so much for us to start with
I (potentially) found the root cause, but I'm not sure that's the fix. Tested it on my local machine and it works for both openai and anthropic. Can you check?

https://github.com/Helicone/helicone/pull/939
Add a reply
Sign up and join the conversation on Discord