Skip to content
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

code parsing via structured ouputs #1579

Open
jungdee opened this issue Jan 13, 2025 · 2 comments
Open

code parsing via structured ouputs #1579

jungdee opened this issue Jan 13, 2025 · 2 comments

Comments

@jungdee
Copy link

jungdee commented Jan 13, 2025

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

Parsing code is a common form of parsing code blocks (eg python). However, there are often cases where code is written as a message and the code is not executed.

Describe alternatives you've considered

If we use openai, we can ask it to write roles and content using structured ouputs. This will make for a more stable writing code.

Additional context

I'm sad that there haven't been any recent commits 🥲

@jungdee
Copy link
Author

jungdee commented Jan 13, 2025

Hello, we tried to solve the issue.

This is what we did:

Modify the MessageBlock class to parse and display code blocks within messages without executing them. Update the refresh method to use syntax highlighting for code blocks.

You can review changes in this commit: clivinn-shla81092@63cef90.

Caution

Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.

Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

I understand the concept of this commit, but sometimes code is written without backticks as the message, so in those cases it is very difficult to determine whether it is code or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@jungdee and others