Skip to content

Commit

Permalink
syncfusion-stablility
Browse files Browse the repository at this point in the history
  • Loading branch information
ARYPROGRAMMER committed Oct 3, 2024
1 parent 59e3610 commit aef1c19
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*"
tag: v2.0.3
tag: v2.0.3.1
token: ${{ secrets.TOKEN }}
release_name: "stable-build-v2"
release_name: "stable-build-v2.0.3.1"
body: |
## What's New in v2.0.3
- **Bug Fixes**: Resolved an issue where all three quotes would display at the same time.
## What's New in v2.0.3.1
- **Bug Fixes**: Resolved an issue where all quotes & mood would become repetitive.
- **Performance Improvements**: Optimized API response times.
- **UI Enhancements**: Updated the home UI and improved navigation for a smoother experience.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

**NEW**

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

Expand Down
52 changes: 32 additions & 20 deletions server/Mental Health api/infrastructure/geminiai/geminiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ class GeminiApi extends QuoteRepository{
"You are doing great! Keep up the good work and stay positive"
if mood is "sad", the response could be:
"It's okay to feel sad sometimes. Remember to take care of yourself and reach out to someone you trust for support"
so the mood is : ${mood}
so the mood of the user is : ${mood}
onrefresh provide new advice on each request
return only the string no brackets no keyword no JSON nothing
Expand Down Expand Up @@ -99,11 +103,29 @@ class GeminiApi extends QuoteRepository{


// const result = generateText(prompt);


const result = await model.generateContent(prompt);
const response = await result.response;
const text = response.text();
return text;
const res = await groq.chat.completions.create({
messages: [
{
role: "user",
content: prompt,
},
],
model: "llama3-8b-8192",

temperature: 1,
max_tokens: 2048,


});

return res.choices[0].message.content;

// const result = await model.generateContent(prompt);
// const response = await result.response;
// const text = response.text();
// return text;
}

async getDailyQuotes(){
Expand All @@ -116,22 +138,9 @@ class GeminiApi extends QuoteRepository{
noonQuote: "Your noon quote here",
eveningQuote: "Your evening quote here"
}
Provide concise and precise quotes that are inspirational and motivational. The quotes should be different for each part of the day.
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:
{
morningQuote: "Your morning quote here",
noonQuote: "To be provided at noon",
eveningQuote: "To be provided in the evening"
}
reference for time , do not include any source code in the response and omit the word json in the response:
00:00:00 to 11:59:59 - morning
12:00:00 to 17:59:59 - noon
18:00:00 to 23:59:59 - evening
provide new quotes on each request
do not include any source code in the response and omit the word json in the response also provide new quotes on each request
`;

Expand All @@ -145,6 +154,9 @@ class GeminiApi extends QuoteRepository{
],
model: "llama3-8b-8192",
response_format: { type: "json_object" },
temperature: 1,
max_tokens: 2048,


});

Expand Down

0 comments on commit aef1c19

Please sign in to comment.