From 4cc02c429cbc7dfddcbcf57d4bd6d06e96c5a425 Mon Sep 17 00:00:00 2001 From: Angular2guy Date: Thu, 16 May 2024 17:35:53 +0200 Subject: [PATCH] fix: frontend --- .../main/resources/application-ollama.properties | 14 +++++++++++++- .../src/app/image-query/image-query.component.html | 7 +++---- .../src/app/image-query/image-query.component.scss | 4 ++++ .../src/app/image-query/image-query.component.ts | 8 ++------ 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/backend/src/main/resources/application-ollama.properties b/backend/src/main/resources/application-ollama.properties index 19fee1e..e932fde 100644 --- a/backend/src/main/resources/application-ollama.properties +++ b/backend/src/main/resources/application-ollama.properties @@ -4,11 +4,23 @@ spring.ai.embedding.transformer.enabled=true document-token-limit=150 embedding-token-limit=500 spring.liquibase.change-log=classpath:/dbchangelog/db.changelog-master-ollama.xml + +# sql creation # sql model for free production use with clause that fine tuned values have to be published. #spring.ai.ollama.chat.model=sqlcoder:70b-alpha-q6_K + +# document processing # falcon model config free production use #spring.ai.ollama.chat.model=falcon:40b # beluga model config only for non production/commercial use spring.ai.ollama.chat.model=stable-beluga:13b + +# function calling #spring.ai.ollama.chat.model=mixtral:8x7b-text-v0.1-q6_K -#spring.ai.ollama.chat.model=llava:34b-v1.6-q6_K \ No newline at end of file + +# image processing +#spring.ai.ollama.chat.model=llava:34b-v1.6-q6_K +#spring.ai.ollama.chat.options.num-thread=8 +#spring.ai.ollama.chat.options.keep_alive=1s + +#spring.ai.ollama.embedding.options.model=mxbai-embed-large:335m #test with Spring AI 1.0 \ No newline at end of file diff --git a/frontend/src/angular/src/app/image-query/image-query.component.html b/frontend/src/angular/src/app/image-query/image-query.component.html index 33415c7..447bf86 100644 --- a/frontend/src/angular/src/app/image-query/image-query.component.html +++ b/frontend/src/angular/src/app/image-query/image-query.component.html @@ -71,11 +71,10 @@ }
- - +
@for(myresult of results; track myresult.answer) {
diff --git a/frontend/src/angular/src/app/image-query/image-query.component.scss b/frontend/src/angular/src/app/image-query/image-query.component.scss index 9ac3177..4a0d093 100644 --- a/frontend/src/angular/src/app/image-query/image-query.component.scss +++ b/frontend/src/angular/src/app/image-query/image-query.component.scss @@ -61,4 +61,8 @@ margin-top: 20px; overflow-y: scroll; height: calc(100vh - (36px + 21px + 64px)); +} + +.my-button { + margin-left: 10px; } \ No newline at end of file diff --git a/frontend/src/angular/src/app/image-query/image-query.component.ts b/frontend/src/angular/src/app/image-query/image-query.component.ts index 2f8b9aa..ce0b5e1 100644 --- a/frontend/src/angular/src/app/image-query/image-query.component.ts +++ b/frontend/src/angular/src/app/image-query/image-query.component.ts @@ -10,7 +10,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Component, DestroyRef, inject } from '@angular/core'; +import { Component, DestroyRef } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import {MatInputModule} from '@angular/material/input'; @@ -34,7 +34,7 @@ export class ImageQueryComponent { //'What do you see in the image? Describe the background. Describe the colors.' protected imageForm = new FormGroup({ file: new FormControl(null, Validators.required), - prompt: new FormControl('What do you see in the image? Describe the background. Describe the colors.', Validators.minLength(3)) + prompt: new FormControl('What do you see in the image? Describe the background. Describe the colors.', Validators.compose([Validators.required, Validators.minLength(3)])) }); protected queryControl = new FormControl('', Validators.compose([Validators.required, Validators.minLength(3)])); protected uploading = false; @@ -128,8 +128,4 @@ export class ImageQueryComponent { protected logout(): void { console.log('logout'); } - - protected cancel(): void { - this.router.navigate(['/']); - } }