alexfilatov

alexfilatov

GitHub - alexfilatov/stacktrace_gpt: StacktraceGpt is an Elixir tool that uses OpenAI's GPT to provide human-friendly explanations for your application's error stack traces, simplifying debugging and enhancing your learning experience. · GitHub :robot:

I’ve just released StacktraceGpt. It’s a tool uses OpenAI’s GPT to give easy-to-understand explanations for the error messages your app gives. Should help fixing problems and learning easier.

Please let me know your thoughts!
Thanks! :folded_hands:

Showing Posts 1 to 8

D4no0

D4no0

I don’t see any benefit to this, as there are either good stacktraces that are clear in their error or some abomination stacktraces that come from underlying libraries, for example try to put a negative port in a http client that uses erlang inet under the hood, in witch case the bot will help you with nothing as it wouldn’t understand the context of the question.

alexfilatov

alexfilatov OP

Thank you for your feedback! You’re correct, well-formed stack traces often provide clear error information, and complex ones can be tough. StacktraceGpt aims to augment developers’ understanding, especially for those who might be new to Elixir or who might not be familiar with the nuances of certain libraries or the Erlang/OTP ecosystem.

While it may not always deduce the specific context of an error, it can offer insight into the type of error, common causes, and potential fixes. I appreciate your perspective and acknowledge the room for improvement in the tool’s current state.

hst337

hst337

That sound very interesting!

Perhaps it might help to provide an example where the explanation actually helps to understand the error, because current example is kinda strange

Stacktrace: function Ecto.Multi.new/0 is undefined
Explanation: The error message is stating that the function Ecto.Multi.new/0 is undefined

alexfilatov

alexfilatov OP

My apologies for the confusion - the example was indeed not ideal. It was merely set up to provoke a crash, a more representative example would better showcase StacktraceGpt’s potential.
I appreciate your feedback and will work on creating a better demo to underline the library’s usefulness. Thanks for your interest and suggestions!

al2o3cr

al2o3cr

GPT does better when it’s given more context as input. Right now, the stacktrace_gpt code doesn’t supply anything besides the stacktrace itself, which is rarely enough to understand the problem.

I’d recommend the same thing for GPT as I’d want when presented with a stacktrace: an answer for “what’s the code at / around the point where the failure happened?”

Several things that seem like they’ll make doing that challenging:

  • the file may be too big for the LLM’s context window
  • users may not want to upload proprietary source code to OpenAI’s servers
  • the relevant line may not be the top one from the stacktrace, especially if it’s in stdlib code
alexfilatov

alexfilatov OP

Appreciate the candid feedback!
StacktraceGpt is a bit basic right now and it’s definitely a room to grow.
Will create couple of enhancement issues in GitHub after this post :heart_eyes:

hst337

hst337

I think that you can integrate my compiler Tria which has translator from erlang’s abstract forms AST to Elixir’s AST which will provide a part of code which was broken

mfa = {module, function, arity}
abstract_code =
  module
  |> Tria.Language.Beam.object_code!()
  |> Tria.Language.Beam.abstract_code!()

tria = Tria.Language.Beam.tria(abstract_code, mfa)
elixir_ast = Tria.Compiler.ElixirTranslator.from_tria(tria)

elixir_ast
|> Macro.to_string()
|> Code.format_string!()
# Returns string representation of a function
alexfilatov

alexfilatov OP

that’s an interesting idea @hst337, I’ll have a look on your compiler, thanks!

— All posts loaded —

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews