Skip to content

Commit

Permalink
Merge pull request #2 from tomkat-cr/GS-154_post_hackathon_fixes
Browse files Browse the repository at this point in the history
GS-154 - Post hackathon fixes
  • Loading branch information
tomkat-cr authored Nov 20, 2024
2 parents 501f594 + 2b4f27d commit 501cbdf
Show file tree
Hide file tree
Showing 22 changed files with 1,118 additions and 328 deletions.
50 changes: 4 additions & 46 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,70 +1,28 @@
PYTHON_VERSION=3.10
#
# App parameters
# APP_NAME="GS Code Generator"
# APP_NAME="GSAM Ideator and Code Generator"
# MAKER_MAME="Carlos J. Ramirez"
#
##############################
#
# LLM parameters
# LLM_PROVIDER=openai
# LLM_PROVIDER=groq
# LLM_PROVIDER=nvidia
# LLM_PROVIDER=ollama
# LLM_PROVIDER=huggingface
# LLM_PROVIDER=together_ai
# LLM_PROVIDER=rhymes
#
# texto-to-image provider
# TEXT_TO_IMAGE_PROVIDER=openai
# TEXT_TO_IMAGE_PROVIDER=huggingface
#
# Text-to-video provider
# TEXT_TO_VIDEO_PROVIDER=rhymes
#
##############################
#
# OpenAI
OPENAI_API_KEY=
# OPENAI_MODEL=gpt-4o-mini
# OPENAI_IMAGE_GEN_MODEL=dall-e-3
#
# Groq
GROQ_API_KEY=
# GROQ_MODEL_NAME=llama3-groq-70b-8192-tool-use-preview
# GROQ_MODEL_NAME=llama3-8b-8192
#
# RHYMES parameters
# Rhymes
RHYMES_ARIA_API_KEY=
# RHYMES_MODEL_NAME=aria
#
RHYMES_ALLEGRO_API_KEY=
#
# Ollama
OLLAMA_MODEL=llama3.2
# OLLAMA_MODEL=nemotron
# OLLAMA_MODEL=llava
# OLLAMA_MODEL=deepseek-coder-v2
#
# OLLAMA_BASE_URL=localhost:11434
#
# Nvidia
NVIDIA_API_KEY=
# NVIDIA_MODEL_NAME="nvidia/llama-3.1-nemotron-70b-instruct"
#
# HuggingFace
# Hugging Face credentials and model URL
HUGGINGFACE_API_KEY=
#
# HUGGINGFACE_MODEL_NAME=meta-llama/Meta-Llama-3.1-8B-Instruct
#
# HUGGINGFACE_IMAGE_MODEL_NAME="black-forest-labs/FLUX.1-schnell"
# HUGGINGFACE_IMAGE_MODEL_NAME="black-forest-labs/FLUX.1-dev"
#
# Together AI
TOGETHER_AI_API_KEY=
# TOGETHER_AI_MODEL_NAME="meta-llama/Llama-3.2-3B-Instruct-Turbo"
# TOGETHER_AI_SAFETY_MODEL="meta-llama/Meta-Llama-Guard-3-8B"
# X AI
XAI_API_KEY=
#
##############################
#
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Ch
### Breaks


## 0.2.0 (2024-11-19)
---

### New
Add ideation from a user's prompt in the App Ideation section [GS-154].
Add the "Generate App Ideas" button to the App Ideation section [GS-154].
Add the X AI Grok model [GS-157].
Add "timeframe" to ideation form [GS-154].
Add model advanced configuration (temperature, max. tokens, top P, frequency penalty, presense penalty) [GS-154].
Add "add_js_script()" to inject any JS code to streamlit [GS-155].

### Changes
All prompts were enhanced.
LLM_PROVIDERS, TEXT_TO_IMAGE_PROVIDERS, and TEXT_TO_VIDEO_PROVIDERS list were converted to dict with all the providers having a list of "requirements" and "active" attributes [GS-154].

### Fixes
Fix the error when the image does not exist [GS-154].
Fix errors with the OpenAI image generation [GS-154].

### Breaks
LLM_PROVIDERS_COMPLETE_LIST config parameter removed. Instead the LLM_PROVIDERS list was converted to a dict with all the providers having a list of "requirements" and "active" attributes [GS-154].


## 0.1.0 (2024-11-10)
---

Expand Down Expand Up @@ -64,7 +87,7 @@ Add image generation [GS-152].
Add the video gallery page [GS-153].
Add the image gallery page [GS-55].
Add MongoDB support [GS-152].
Add Together.AI support [GS-119].
Add Together.AI support [GS-158].
Add Meta Llama models support [GS-119].
Add prompt enhancement support [GS-152].
Add data management pull down section in the side bar [GS-152].
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Video Gallery

## Context

This project was developed as part of the [Llama Impact Hackathon](https://lablab.ai/event/llama-impact-hackathon) organized by [Lablab.ai](https://lablab.ai) and happened on November 1st to 4rd, 2024.
This project was developed as part of the [Llama Impact Hackathon](https://lablab.ai/event/llama-impact-hackathon) organized by [Lablab.ai](https://lablab.ai).

![Hackathon banner image](./assets/llama-impact-hackathon-official-banner.webp)

Expand Down
83 changes: 58 additions & 25 deletions config/app_config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"APP_NAME": "GSAM",
"APP_VERSION": "0.1.0",
"MAKER_MAME": "The FynBots",
"APP_VERSION": "0.2.0",
"MAKER_MAME": "Carlos J. Ramirez",
"APP_ICON": ":sparkles:",
"APP_DESCRIPTION": "The GenericSuite App Maker (GSAM) is a tool to help on the software development process for any Application. It allows to generate code, images, video or answers from a text prompt, and kick start code to be used with the GenericSuite libraries.",
"APP_DESCRIPTION": "GenericSuite App Maker (GSAM) is a tool designed to streamline the app development process. It supports ideation, naming, presentation, AI models evaluation, configuration and code generation compatible with GenericSuite library.",
"CONVERSATION_DB_PATH": "./db/conversations.json",
"DEFAULT_PAGE": "home",
"CODE_GENERATION_ENABLED": true,
Expand All @@ -25,28 +25,48 @@
"SUGGESTIONS_QTY": 4,
"REFINE_VIDEO_PROMPT_TEXT": "[refine_video_prompt.txt]",
"REFINE_LLM_PROMPT_TEXT": "[refine_llm_prompt.txt]",
"LLM_PROVIDERS_COMPLETE_LIST": [
"chat_openai",
"groq",
"ollama",
"rhymes",
"nvidia",
"huggingface",
"together_ai"
],
"LLM_PROVIDERS": {
"openai": {
"requirements": ["OPENAI_API_KEY"]
},
"groq": {
"requirements": ["GROQ_API_KEY"],
"active:": true
},
"ollama": {
"requirements": [],
"active:": true
},
"rhymes": {
"requirements": ["RHYMES_ARIA_API_KEY"],
"active:": true
},
"nvidia": {
"requirements": ["NVIDIA_API_KEY"],
"active:": true
},
"huggingface": {
"requirements": ["HUGGINGFACE_API_KEY"],
"active:": true
},
"together_ai": {
"requirements": ["TOGETHER_AI_API_KEY"],
"active:": true
},
"xai": {
"requirements": ["XAI_API_KEY"],
"active:": true
}
},
"NO_SYSTEM_PROMPT_ALLOWED_PROVIDERS": [
"nvidia"
],
"NO_SYSTEM_PROMPT_ALLOWED_MODELS": [
"o1-preview",
"o1-mini"
],
"LLM_PROVIDERS": [
"together_ai",
"groq"
],
"LLM_AVAILABLE_MODELS": {
"chat_openai": [
"openai": [
"gpt-4o",
"gpt-4o-mini"
],
Expand Down Expand Up @@ -76,24 +96,37 @@
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo"
],
"xai": [
"grok-beta"
]
},
"TEXT_TO_IMAGE_PROVIDERS": [
"huggingface",
"openai"
],
"TEXT_TO_IMAGE_PROVIDERS": {
"huggingface": {
"requirements": ["HUGGINGFACE_API_KEY"],
"active:": true
},
"openai": {
"requirements": ["OPENAI_API_KEY"],
"active:": true
}
},
"TEXT_TO_IMAGE_AVAILABLE_MODELS": {
"openai": [
"dall-e-3"
"dall-e-3",
"gpt-4o"
],
"huggingface":[
"black-forest-labs/FLUX.1-schnell",
"black-forest-labs/FLUX.1-dev"
]
},
"TEXT_TO_VIDEO_PROVIDERS": [
"rhymes"
],
"TEXT_TO_VIDEO_PROVIDERS": {
"rhymes": {
"requirements": ["RHYMES_ALLEGRO_API_KEY"],
"active:": true
}
},
"TEXT_TO_VIDEO_AVAILABLE_MODELS": {
"rhymes": [
"allegro"
Expand Down
15 changes: 15 additions & 0 deletions config/generate_app_ideas_from_question_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Generate suggestions for web and mobile software application mind-blowing ideas. These applications should be practical and impactful. Focus on ideas that are achievable within a constrained timeframe, suitable for an experienced developer.

# Requirements
- The application subject is: {question}
- Include a mix of fun, practical, profitable (or with social impact depending on the subject), or utility-based ideas.
- Specifically call out the target (web vs mobile application).
- Each suggestion should clearly explain the purpose of the app and how the development can be accomplished in terms of scope.

# Output Format

Provide the output as descriptions, each one a a bullet point and including: name, goal, alingment with the application subject, and real-world impact.

# Notes
- Ensure simplicity by focusing on core features that solve a specific problem or add value.
- Consider app categories like productivity, fun/entertainment, personal trackers, or unique generators related to the application subject.
16 changes: 16 additions & 0 deletions config/generate_app_ideas_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Generate suggestions for web and mobile software application mind-blowing ideas. These applications should be practical and impactful. Focus on ideas that are achievable within a constrained timeframe, suitable for an experienced developer.

# Requirements
- The application subject is: {subject}
- Constrained timeframe: Ensure suggested ideas can reasonably be scoped and implemented within {timeframe}.
- Include a mix of fun, practical, profitable (or with social impact depending on the subject), or utility-based ideas.
- Specifically call out the target (web vs mobile application).
- Each suggestion should clearly explain the purpose of the app and how the development can be accomplished in terms of scope.

# Output Format

Provide the output as descriptions, each one a a bullet point and including: name, goal, alingment with the application subject, and real-world impact.

# Notes
- Ensure simplicity by focusing on core features that solve a specific problem or add value.
- Consider app categories like productivity, fun/entertainment, personal trackers, or unique generators related to the application subject.
26 changes: 26 additions & 0 deletions config/generate_app_names_from_question_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Generate catchy and creative names for a software application related to `{question}`.

Please take into consideration the nature of the application. The names should be memorable, easy to spell, and relevant to {question}. Emphasize creativity while making sure the names clearly convey the essence of the tool or service provided.

Aim for 5-10 different unique suggestions. You may also combine words or concepts to create meaningful and appealing names.

# Output Format

Provide a list of suggested names. Each suggestion should be on a separate line, formatted in plain text.

# Examples

**For a web application about managing daily tasks:**
- DailyZen
- PlanIt
- TaskMaster
- DoItNow
- FocusFlow

**For a mobile app about fitness tracking:**
- FitSync
- MoveMore
- StepBoost
- GoalGain
- ActiveLyfe

66 changes: 66 additions & 0 deletions config/generate_app_presentation_from_question_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Create content for PowerPoint slides for a presentation including the main information for each slide and prompts for generating corresponding images.

The presentation subject is: `{question}`

The presentation should contain the following slides:

1. **Title Slide**:
- **Content**: `{title} and {subtitle}` generated from the presentation subject.
- **Speaker Notes**: Introduce the presentation subject and provide context.
- **Prompt for Image**: "Generate an engaging title slide image that visually introduces the subject `{question}`."

2. **Problem Statement**:
- **Content**: Describe the problem or "the pain" described in the presentation subject.
- **Speaker Notes**: Explain why the problem is significant and how the audience might relate to it.
- **Prompt for Image**: "Create an image that depicts individuals facing a common situation related to `{question}`."

3. **Objective**:
- **Content**: Explain the application's main goal.
- **In this case**: `{question}`
- **Speaker Notes**: Emphasize how the objective aligns with solving the problem introduced earlier.
- **Prompt for Image**: "Generate an illustration or icon set showcasing the objective related to `{question}` and how it helps target people/organizations achieve their tasks."

4. **Benefits**:
- **Content**: Include the main benefits related with the presentation subject.
- **Speaker Notes**: Persuade the audience why these benefits help address the problem effectively.
- **Prompt for Image**: "Create an infographic or chart highlighting key benefits of the solution related to `{question}` compared to existing methods or alternatives."

5. **Feedback and Future Development**:
- **Content**: Notable positive aspects and potential improvements of the solution related to the presentation subject.
- **Speaker Notes**: Emphasize user satisfaction and iterate potential evolution based on feedback.
- **Prompt for Image**: "Create a slide image with text boxes or sticky notes representing customer feedback and future enhancements for `{question}`."

6. **Future Vision**:
- **Content**: Describe possible enhancements to the the presentation subject solution.
- **Speaker Notes**: Highlight the future possibilities of `{question}` and how it can evolve to embrace target people/organizations needs.
- **Prompt for Image**: "Depict a futuristic or evolving version of the solution for `{question}`, illustrating new possible features and enhanced capabilities."

7. **Thank You Slide**:
- **Content**: A final message thanking the audience for their interest in the presentation subject.
- **Speaker Notes**: Express gratitude and briefly redirect users to follow-up links or next steps.
- **Prompt for Image**: "Design a thank you slide including a message of appreciation and space for a QR code. Ensure it's visually consistent with the rest of the presentation."

# Output Format

Provide the output as a detailed summary of slide content with image prompts in the following JSON format:

```json
{
"slides": [
{
"title": "[Title of Slide]",
"content": "[Relevant content]",
"speaker_notes": "[Extended explanation intended only for the presenter]",
"image_prompt": "[Image prompt for the generated image]"
}
]
}
```

Include all slide details as distinct items under the "slides" array. Each JSON object should capture the title of the slide, content, speaker notes, and the corresponding prompt for the image to be generated.

# Notes

- Ensure that each slide content is succinct but informative.
- Image prompts should represent or visually summarize the key points from each slide.
- Use individual placeholders relevant to the generated `{title}, {subtitle},` or other brackets to ensure all content points are well-covered.
Loading

0 comments on commit 501cbdf

Please sign in to comment.