New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strings #862
base: development
Are you sure you want to change the base?
Strings #862
Conversation
fixed
…to development
…to development
python inspired string formatting
✅ Deploy Preview for ubiquibot-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
idk why I've got 3 week old commits in this, my dev branch is up to date with upstream and only made this branch this afternoon, fixed now won't happen again. seems that CI is failing because of '.test.ts' but is needed for jest, I can remove the test or I'm open to ideas |
rename test file
This is interesting but I've never heard of f strings. Perhaps you can share some of your favorite resources on it and explain why you were inspired to take this approach? It does look awfully pythonic which I have mixed feelings on. Perhaps there is a TypeScript-esqe parallel that we can draw inspiration from? |
The inspiration comes from using it with gpt prompts when building with langchain, it's readable and robust. The changes from Lang to this was just streamlining what we needed and optimizing things a little. I don't think there is a TS parallel to draw from no at least not to my knowledge, it's a 'formatted string literal' similar to JS/TS I tried to find what you meant when you said this but I couldn't so I don't understand the issue with just using ${} so I figured this was a more elegant way to do things and it can be repurposed as across the bot as opposed to just the E2E tests I presume the issue with using |
It just came to me that there is ofc a way to handle this with just TS and this is probably the sleekest also no longer caring about trying to escape although if using it for prompt template formatting then we should just use different delimiters |
Resolves #837
Quality Assurance: test case written
Just came to me while sorting types for another piece of work