Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Self-healing-LLM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ammar Ahmed
Self-healing-LLM
Commits
52ff4f34
Commit
52ff4f34
authored
7 months ago
by
Aleksander Einarsen
Browse files
Options
Downloads
Patches
Plain Diff
# 115 Working on an iteration test
parent
7bdc7233
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/program/program.go
+1
-0
1 addition, 0 deletions
src/program/program.go
src/program/program_test.go
+25
-5
25 additions, 5 deletions
src/program/program_test.go
with
26 additions
and
5 deletions
src/program/program.go
+
1
−
0
View file @
52ff4f34
...
...
@@ -64,6 +64,7 @@ func (p *Program) Run(userPrompt string, languagePrompt string) {
}
}
// TODO: data writing should not be in this function, this function should just run a single iteration and return all the results
func
(
p
*
Program
)
RunIteration
(
initialPrompt
string
,
currentPrompt
string
,
...
...
This diff is collapsed.
Click to expand it.
src/program/program_test.go
+
25
−
5
View file @
52ff4f34
...
...
@@ -8,6 +8,7 @@ import (
"llama/modules/extraction"
ollamaimplementation
"llama/modules/ollama-implementation"
"testing"
"time"
)
type
NoUI
struct
{}
...
...
@@ -17,13 +18,12 @@ func (n *NoUI) WriteJSON(_ any) error {
return
nil
}
func
TestProgram_Run_WithLlama3_1_AndGolang
(
t
*
testing
.
T
)
{
func
GetOllamaGoProgramNoUI
()
Program
{
clientOptions
:=
options
.
Client
()
.
ApplyURI
(
projectdb
.
UriDb
)
db
:=
projectdb
.
GetDB
(
clientOptions
,
projectdb
.
Production
)
languageModel
:=
&
ollamaimplementation
.
Ollama
{
Model
:
"llama3.1"
}
clientOptions
:=
options
.
Client
()
.
ApplyURI
(
projectdb
.
UriDb
)
db
:=
projectdb
.
GetDB
(
clientOptions
,
projectdb
.
Test
)
compiler
:=
go_compiler_v2
.
GoCompiler
{}
.
CheckCompileErrors
extractor
:=
&
extraction
.
GoExtractor
{}
prog
:=
Program
{
...
...
@@ -35,5 +35,25 @@ func TestProgram_Run_WithLlama3_1_AndGolang(t *testing.T) {
Extractor
:
extractor
,
}
prog
.
Run
(
"userPrompt"
,
extraction
.
GoPrompt
)
return
prog
}
func
TestProgram_Run_WithLlama3_1_AndGolang
(
t
*
testing
.
T
)
{
prog
:=
GetOllamaGoProgramNoUI
()
prog
.
Run
(
"write a code that adds two numbers"
,
extraction
.
GoPrompt
)
}
func
TestProgram_RunIteration_with_FirstIterationHavingBugInCode
(
t
*
testing
.
T
)
{
prog
:=
GetOllamaGoProgramNoUI
()
prog
.
RunIteration
(
"write a code that adds two numbers"
,
"write a code that adds two numbers"
,
extraction
.
GoPrompt
,
[]
int
{},
2
,
time
.
Now
(),
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment