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

Introducing ReScript Guru on Gurubase.io #7168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kursataktas
Copy link

Hello team,

I'm the maintainer of Anteon. We have created Gurubase.io with the mission of building a centralized, open-source tool-focused knowledge base. Essentially, each "guru" is equipped with custom knowledge to answer user questions based on collected data related to that tool.

I wanted to update you that I've manually added the ReScript Guru to Gurubase. ReScript Guru uses the data from this repo and data from the docs to answer questions by leveraging the LLM.

In this PR, I showcased the "ReScript Guru", which highlights that ReScript now has an AI assistant available to help users with their questions. Please let me know your thoughts on this contribution.

Additionally, if you want me to disable ReScript Guru in Gurubase, just let me know that's totally fine.

Signed-off-by: Kursat Aktas <kursat.ce@gmail.com>
@fhammerschmidt
Copy link
Member

Hi!

That's a cool project and it seems to either give accurate answers or no answer at all, which is already good.

However I would not (yet) add it to the Readme or even the rescript-lang.org page.
One gripe I have is the missing syntax highlighting for the ReScript code it puts out. And it also creates very weird (but working) code like this example:

Prompt: "example for setTimeoutFloat"

// Import the necessary functions from the ReScript API
@val external setTimeoutFloat: (unit => unit, float) => Js.Global.timeoutId = "setTimeout"
@val external clearTimeout: Js.Global.timeoutId => unit = "clearTimeout"

// Define a callback function that logs a message to the console
let logMessage = () => {
  Console.log("This message is printed after a delay of 2.5 seconds.")
}

// Set a timeout using setTimeoutFloat with a delay of 2.5 seconds
let timeoutId = setTimeoutFloat(logMessage, 2500.0)

// Optionally, you can clear the timeout before it executes
// clearTimeout(timeoutId)

This creates a new binding for setTimeoutFloat which is already part of the Core library. I tried refining my prompt:

Prompt: "example for setTimeoutFloat, only use new Core standard library"

// Import the Console module for logging
open Console

// Define a function that will be executed after the timeout
let logMessage = () => {
  log("This message is printed after 2.5 seconds.")
}

// Use setTimeoutFloat to schedule the logMessage function to run after 2.5 seconds
let timeoutId = setTimeoutFloat(logMessage, 2500.0)

// Optionally, you can clear the timeout before it executes
// clearTimeout(timeoutId)

This one is better but now it opens the Console which is unusual in most ReScript codebases. You also wouldn't open most modules when you just use a single function.

Maybe the model can be nudged in that direction.

Also you might wanna ask for feedback from ReScript users on the forum.

@kursataktas
Copy link
Author

Thanks for the review @fhammerschmidt

I'll look into the syntax highlighting issue and update this thread.

For other issues, we’ll release significant improvements on the answer generation side, which I believe will address them. Would you be open to giving it another chance once I’m confident it’s robust enough for another review?

@fhammerschmidt
Copy link
Member

Sure!

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

Successfully merging this pull request may close these issues.

2 participants