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

- added new docker-compose file for hosting #9

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a8b6c23
Fix sass file extension; Add global margin around buttons
Aug 14, 2023
de3f5ac
Create new page for listing content
Aug 16, 2023
571d086
Enable dynamic routing in the app
Aug 16, 2023
06ab601
Provide a template for data presentation
Aug 17, 2023
30756ec
First set of changes to connect the data to ui
Aug 23, 2023
001c937
Create new page for listing content
Aug 16, 2023
23c3cb7
Enable dynamic routing in the app
Aug 16, 2023
5b43c65
Provide a template for data presentation
Aug 17, 2023
275d47f
First set of changes to connect the data to ui
Aug 23, 2023
0e75464
Merge branch 'frontend' of github.com:rherlt/reval into frontend
Aug 23, 2023
b9e82d7
Change scenario visualization
Aug 23, 2023
cb1bf29
Fix missing components error
Aug 23, 2023
cb1511e
- added new docker-compose file for hosting
rherlt Aug 23, 2023
5d80f14
Change scenario cards to work with getscenarios
Aug 23, 2023
b4418bd
Fix minor issue
Aug 23, 2023
4cb6992
Improve visual demo
Aug 23, 2023
bb7bbcb
Add backend request to statistics
Aug 23, 2023
2e8b715
Add navigation buttons
Aug 23, 2023
d5efe53
WIP
rherlt Aug 23, 2023
bc72093
- updated api to support new scheme
rherlt Aug 24, 2023
2b26f80
Merge pull request #12 from rherlt/feature/newimportscheme
rherlt Aug 24, 2023
f10e31e
Merge branch 'feature/fix-hosting' into frontend
rherlt Aug 25, 2023
aef4b1e
Merge pull request #13 from rherlt/frontend
rherlt Aug 25, 2023
6c51fcd
Remove example data files and rename list component to statistics
Sep 7, 2023
5545e45
#14 implemented improved algorithm to load responses with least evalu…
rherlt Sep 13, 2023
ce6778b
Merge pull request #22 from rherlt/feature/#14_distribute_work_onFixH…
rherlt Sep 13, 2023
158d392
Add function to calculate the agreement per scenario
Sep 19, 2023
6312dc6
Change RatinngScore to ChatGPT Agreement
Sep 19, 2023
4d7c92b
Fix typo that caused positive userEvaluations not being counted for a…
Sep 20, 2023
f7ce57f
Adjust gpt user name
Sep 25, 2023
647d7da
Merge pull request #26 from rherlt/#17_gptEvaluations
rherlt Sep 25, 2023
996a92c
Merge pull request #29 from rherlt/frontend
rherlt Sep 25, 2023
0a227cb
Rename 'list' to statistics'
rherlt Sep 27, 2023
3abfd66
Merge pull request #32 from rherlt/feature/statistics-fix_based_on_fi…
rherlt Sep 27, 2023
777b916
Fix typo
Sep 27, 2023
a7c7b85
Merge pull request #34 from rherlt/feature/statistics-fix_based_on_fi…
rherlt Sep 27, 2023
62481b3
Change query to correctly count evaluated responses
Sep 27, 2023
2b164e6
Remove debugging mode of query
Sep 27, 2023
9a593aa
Cleanup statistics page and fix some bugs
Sep 28, 2023
564ff8c
Merge pull request #37 from rherlt/#19_progress_statistcs_fix-from_fi…
rherlt Oct 4, 2023
a536483
Merge pull request #39 from rherlt/frontend-from_fix_hosting
rherlt Oct 4, 2023
a422e13
Update layout of statistic cards
Oct 6, 2023
cec5b1a
Merge branch 'feature/fix-hosting' into ui_adjustments-from_fix_hosting
Tuuby Oct 6, 2023
c04d1c7
Merge pull request #41 from rherlt/ui_adjustments-from_fix_hosting
rherlt Oct 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion api/evaluationapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: '0.2'
version: '0.3'
servers:
- url: '{protocol}://{environment}:{port}/api/'
variables:
Expand Down Expand Up @@ -225,6 +225,10 @@ components:
type: string
description: The description of the Scenario.
example: 'Das ist das erste tolle Szenario mit den Antworten aus Llama-2-13b-chat-hf_responses_rated_by_gpt-3.5-turbo.json'
systemPrompt:
type: string
description: The used systemprompt for the scenario.
example: '....'
totalResponseCount:
type: integer
format: int32
Expand Down
3 changes: 2 additions & 1 deletion build/reval/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ ENV GIN_MODE=release

EXPOSE 8080

USER nonroot:nonroot
# causes file permission issues under ubutu, but was working on windows an macos
# USER nonroot:nonroot

ENTRYPOINT ["./reval"]
4 changes: 2 additions & 2 deletions cmd/reval/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ func main() {
})

//register folder for static web deployment
r.Static("/ui/", config.Current.Gin_Web_Path)
r.Static(config.Current.Gin_Web_BaseUrl, config.Current.Gin_Web_Path)

//setup CORS
corsConfig := cors.DefaultConfig()
corsConfig.AllowHeaders = append(corsConfig.AllowHeaders, config.Current.Gin_Cors_AdditionalAllowedHeaders...)
corsConfig.AllowAllOrigins = config.Current.Gin_Cors_AllowAllOrigins
r.Use(cors.New(corsConfig))
r.Use(oidc.OidcAuthMiddleware(config.Current.Oidc_Authority, config.Current.Oidc_Audience))
r.Use(oidc.OidcAuthMiddleware(config.Current.Oidc_Authority, config.Current.Oidc_Audience, config.Current.Gin_Api_BaseUrl))

//register HTTP handlers for evaluatio api
si := new(controller.EvaluationApiServerInterface)
Expand Down
48 changes: 48 additions & 0 deletions docker-compose-reval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
services:
reval:
container_name: reval
image: local/reval:latest
depends_on:
- nginx-proxy
- nginx-proxy-acme
environment:
- OIDC_AUDIENCE=https://reval.th-b.com/api
- VIRTUAL_HOST=reval.th-b.com
- LETSENCRYPT_HOST=reval.th-b.com
- LETSENCRYPT_EMAIL=webmaster@th-b.com
ports:
- "8080:8080"
volumes:
- "./tmp/:/app/data/" #sqlite database path

# This services are required to run an NGINX reverse proxy that can isse let's encrypt certificates
nginx-proxy:
container_name: nginx-proxy
image: nginxproxy/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- "./tmp/hosting/certs:/etc/nginx/certs"
- "./tmp/hosting/vhost:/etc/nginx/vhost.d"
- "./tmp/hosting/html:/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"

nginx-proxy-acme:
container_name: nginx-proxy-acme
image: nginxproxy/acme-companion
depends_on:
- nginx-proxy
environment:
- DEFAULT_EMAIL=webmaster@th-b.com
- NGINX_PROXY_CONTAINER=nginx-proxy
volumes:
- "./tmp/hosting/certs:/etc/nginx/certs"
- "./tmp/hosting/vhost:/etc/nginx/vhost.d"
- "./tmp/hosting/html:/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./tmp/hosting/acme:/etc/acme.sh"
volumes:
hosting:
external: true
3 changes: 2 additions & 1 deletion ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

151 changes: 112 additions & 39 deletions ent/mutation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading