Skip to content
Snippets Groups Projects
Commit fa64557e authored by Sivert2101's avatar Sivert2101
Browse files

started making the automatic promptloist modular

parent c6b965d6
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,11 @@ package main
import (
"fmt"
"io"
"llama/compiler"
displayindicator "llama/display-indicator"
"llama/extraction"
ollamaimplementation "llama/ollama-implementation"
"os"
"strings"
"llama/promptlist"
)
func main() {
......@@ -18,20 +16,9 @@ func main() {
//fmt.Print("Enter your prompt (or type 'exit' to quit): ")
//userPrompt, _ := reader.ReadString('\n')
//userPrompt = strings.TrimSpace(userPrompt)
promptText, err := os.Open("promptList.txt")
if err != nil {
fmt.Println("Error opening file", err)
}
text, err := io.ReadAll(promptText)
if err != nil {
fmt.Println("Error reading file:", err)
return
}
prompt := string(text)
promptList := strings.Split(prompt, "\n")
promptList := promptlist.PromptList()
fmt.Println(promptList)
var userPrompt = ""
for i := range promptList {
......@@ -94,3 +81,7 @@ func main() {
}
}
}
func promptList() {
panic("unimplemented")
}
write a code that ads 1 and 1
make a output with numbers from 1 to 10
make a output with prime numbers from 1 to 20
make a bubble sort and input to run it from main
\ No newline at end of file
write a code that ads 1 and 1,
make a output with numbers from 1 to 10,
make a output with prime numbers from 1 to 20,
make a bubble sort and input to run it from main
\ No newline at end of file
package promptlist
import (
"fmt"
"io"
"os"
"strings"
)
func PromptList() []string {
promptText, err := os.Open("promptlist/promptList.txt")
if err != nil {
fmt.Println("Error opening file", err)
}
text, err := io.ReadAll(promptText)
if err != nil {
fmt.Println("Error reading file:", err)
return nil
}
prompt := string(text)
promptList := strings.Split(prompt, ",")
fmt.Print(promptList)
return promptList
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment