Skip to content
Snippets Groups Projects
Commit 2ecca693 authored by Ammar Ahmed's avatar Ammar Ahmed :speech_balloon:
Browse files

fix type specification in main.go

parent bafb34c3
No related branches found
No related tags found
No related merge requests found
......@@ -48,15 +48,13 @@ func main() {
// Update the conversation context with the response
conversationContext = updatedContext
var generatedCode = extraction.Extract(response)
generatedCode, _ := extraction.Extract(response) // Handle error with string
fmt.Println("Ollama's response:", generatedCode)
var output string
var er error
output, er = compiler.CompileStringToGo(generatedCode)
output, err := compiler.CompileStringToGo(generatedCode)
if er != nil {
if err != nil {
userPrompt = output + "\nFollowing are the errors, please fix the code. Write it again, and write only source code along with same test cases with no further explanation. The format should be ```rust <yourcode + testcases> ```"
} else {
fmt.Println("Compiled successfully. Here is the output: %v", output)
......@@ -65,7 +63,3 @@ func main() {
}
}
// Following will be the suffix string for fixing the errors:
// \nFollowing are the errors, please fix the code. Write it again, and write only source code along with same test cases with no further explanation. The format should be ```rust <yourcode + testcases> ```"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment