Skip to content

Commit aef1c19

Browse files
committed
syncfusion-stablility
1 parent 59e3610 commit aef1c19

File tree

3 files changed

+38
-26
lines changed

3 files changed

+38
-26
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
uses: ncipollo/release-action@v1
2727
with:
2828
artifacts: "build/app/outputs/apk/release/*"
29-
tag: v2.0.3
29+
tag: v2.0.3.1
3030
token: ${{ secrets.TOKEN }}
31-
release_name: "stable-build-v2"
31+
release_name: "stable-build-v2.0.3.1"
3232
body: |
33-
## What's New in v2.0.3
34-
- **Bug Fixes**: Resolved an issue where all three quotes would display at the same time.
33+
## What's New in v2.0.3.1
34+
- **Bug Fixes**: Resolved an issue where all quotes & mood would become repetitive.
3535
- **Performance Improvements**: Optimized API response times.
3636
- **UI Enhancements**: Updated the home UI and improved navigation for a smoother experience.
3737

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
**NEW**
66

7-
## What's New in v2.0.2
8-
- **Bug Fixes**: Resolved an issue where all three quotes would display at the same time.
7+
## What's New in v2.0.3.1
8+
- **Bug Fixes**: Resolved an issue where all quotes & mood would become repetitive.
99
- **Performance Improvements**: Optimized API response times.
1010
- **UI Enhancements**: Updated the home UI and improved navigation for a smoother experience.
1111

server/Mental Health api/infrastructure/geminiai/geminiService.js

+32-20
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ class GeminiApi extends QuoteRepository{
6262
6363
"You are doing great! Keep up the good work and stay positive"
6464
65+
if mood is "sad", the response could be:
66+
"It's okay to feel sad sometimes. Remember to take care of yourself and reach out to someone you trust for support"
6567
66-
so the mood is : ${mood}
68+
so the mood of the user is : ${mood}
69+
70+
onrefresh provide new advice on each request
6771
6872
return only the string no brackets no keyword no JSON nothing
6973
@@ -99,11 +103,29 @@ class GeminiApi extends QuoteRepository{
99103

100104

101105
// const result = generateText(prompt);
106+
102107

103-
const result = await model.generateContent(prompt);
104-
const response = await result.response;
105-
const text = response.text();
106-
return text;
108+
const res = await groq.chat.completions.create({
109+
messages: [
110+
{
111+
role: "user",
112+
content: prompt,
113+
},
114+
],
115+
model: "llama3-8b-8192",
116+
117+
temperature: 1,
118+
max_tokens: 2048,
119+
120+
121+
});
122+
123+
return res.choices[0].message.content;
124+
125+
// const result = await model.generateContent(prompt);
126+
// const response = await result.response;
127+
// const text = response.text();
128+
// return text;
107129
}
108130

109131
async getDailyQuotes(){
@@ -116,22 +138,9 @@ class GeminiApi extends QuoteRepository{
116138
noonQuote: "Your noon quote here",
117139
eveningQuote: "Your evening quote here"
118140
}
141+
Provide concise and precise quotes that are inspirational and motivational. The quotes should be different for each part of the day.
119142
120-
return only those values for the quotes in which the current INDIAN STANDARD TIME falls. For example, if the IST (INDIAN STANDARD TIME) is 05:00:00 then the response is:
121-
122-
{
123-
morningQuote: "Your morning quote here",
124-
noonQuote: "To be provided at noon",
125-
eveningQuote: "To be provided in the evening"
126-
}
127-
128-
129-
reference for time , do not include any source code in the response and omit the word json in the response:
130-
00:00:00 to 11:59:59 - morning
131-
12:00:00 to 17:59:59 - noon
132-
18:00:00 to 23:59:59 - evening
133-
134-
provide new quotes on each request
143+
do not include any source code in the response and omit the word json in the response also provide new quotes on each request
135144
136145
`;
137146

@@ -145,6 +154,9 @@ class GeminiApi extends QuoteRepository{
145154
],
146155
model: "llama3-8b-8192",
147156
response_format: { type: "json_object" },
157+
temperature: 1,
158+
max_tokens: 2048,
159+
148160

149161
});
150162

0 commit comments

Comments
 (0)