barunsaha commited on
Commit
fb084f1
·
1 Parent(s): c2882ca

Add new models and update project description

Browse files
Files changed (3) hide show
  1. README.md +20 -16
  2. app.py +1 -8
  3. src/slidedeckai/global_config.py +30 -3
README.md CHANGED
@@ -84,21 +84,25 @@ Based on several experiments, SlideDeck AI generally recommends the use of **Mis
84
 
85
  The supported LLMs offer different styles of content generation. Use one of the following LLMs along with relevant API keys/access tokens, as appropriate, to create the content of the slide deck:
86
 
87
- | LLM | Provider (code) | Requires API key | Characteristics |
88
- |:------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------|:-------------------------|
89
- | Claude Haiku 4.5 | Anthropic (`an`) | Mandatory; [get here](https://platform.claude.com/settings/keys) | Faster, detailed |
90
- | Gemini 2.0 Flash | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Faster, longer content |
91
- | Gemini 2.0 Flash Lite | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Fastest, longer content |
92
- | Gemini 2.5 Flash | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Faster, longer content |
93
- | Gemini 2.5 Flash Lite | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Fastest, longer content |
94
- | GPT | Azure OpenAI (`az`) | Mandatory; [get here](https://ai.azure.com/resource/playground) NOTE: You need to have your subscription/billing set up | Faster, longer content |
95
- | Command R+ | Cohere (`co`) | Mandatory; [get here](https://dashboard.cohere.com/api-keys) | Shorter, simpler content |
96
- | Gemini-2.0-flash-001 | OpenRouter (`or`) | Mandatory; [get here](https://openrouter.ai/settings/keys) | Faster, longer content |
97
- | GPT-3.5 Turbo | OpenRouter (`or`) | Mandatory; [get here](https://openrouter.ai/settings/keys) | Faster, longer content |
98
- | DeepSeek V3-0324 | Together AI (`to`) | Mandatory; [get here](https://api.together.ai/settings/api-keys) | Slower, medium-length |
99
- | Llama 3.3 70B Instruct Turbo | Together AI (`to`) | Mandatory; [get here](https://api.together.ai/settings/api-keys) | Slower, detailed |
100
- | Llama 3.1 8B Instruct Turbo 128K | Together AI (`to`) | Mandatory; [get here](https://api.together.ai/settings/api-keys) | Faster, shorter |
101
- | Llama-3.3-Swallow-70B-Instruct-v0.4 | SambaNova (`sn`) | Mandatory; [get here](https://cloud.sambanova.ai/apis) | Fast, shorter |
 
 
 
 
102
 
103
  > **IMPORTANT**: SlideDeck AI does **NOT** store your API keys/tokens or transmit them elsewhere. If you provide your API key, it is only used to invoke the relevant LLM to generate contents. That's it! This is an
104
  Open-Source project, so feel free to audit the code and convince yourself.
@@ -150,7 +154,7 @@ pip install -r requirements.txt
150
  streamlit run ./app.py # Run the application
151
  ```
152
 
153
- 💡If you have cloned the repository locally but cannot open and view the PPTX templates, you may need to run `git lfs pull` to download the template files. Without this, although content generation will work, the slide deck cannot be created.
154
 
155
  The `.env` file should be created inside the `slide-deck-ai` directory.
156
 
 
84
 
85
  The supported LLMs offer different styles of content generation. Use one of the following LLMs along with relevant API keys/access tokens, as appropriate, to create the content of the slide deck:
86
 
87
+ | LLM | Provider (code) | Requires API key | Characteristics |
88
+ |:------------------------------------|:-------------------------|:-------------------------------------------------------------------------------------------------------------------------|:-------------------------|
89
+ | Claude Haiku 4.5 | Anthropic (`an`) | Mandatory; [get here](https://platform.claude.com/settings/keys) | Faster, detailed |
90
+ | Gemini 2.0 Flash | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Faster, longer content |
91
+ | Gemini 2.0 Flash Lite | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Fastest, longer content |
92
+ | Gemini 2.5 Flash | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Faster, longer content |
93
+ | Gemini 2.5 Flash Lite | Google Gemini API (`gg`) | Mandatory; [get here](https://aistudio.google.com/apikey) | Fastest, longer content |
94
+ | GPT-4.1-mini | OpenAI (`oa`) | Mandatory; [get here](https://platform.openai.com/settings/organization/api-keys) | Faster, medium content |
95
+ | GPT-4.1-nano | OpenAI (`oa`) | Mandatory; [get here](https://platform.openai.com/settings/organization/api-keys) | Faster, shorter content |
96
+ | GPT-5 | OpenAI (`oa`) | Mandatory; [get here](https://platform.openai.com/settings/organization/api-keys) | Slow, shorter content |
97
+ | GPT | Azure OpenAI (`az`) | Mandatory; [get here](https://ai.azure.com/resource/playground) NOTE: You need to have your subscription/billing set up | Faster, longer content |
98
+ | Command R+ | Cohere (`co`) | Mandatory; [get here](https://dashboard.cohere.com/api-keys) | Shorter, simpler content |
99
+ | Gemini-2.0-flash-001 | OpenRouter (`or`) | Mandatory; [get here](https://openrouter.ai/settings/keys) | Faster, longer content |
100
+ | GPT-3.5 Turbo | OpenRouter (`or`) | Mandatory; [get here](https://openrouter.ai/settings/keys) | Faster, longer content |
101
+ | DeepSeek-V3.1-Terminus | SambaNova (`sn`) | Mandatory; [get here](https://cloud.sambanova.ai/apis) | Fast, detailed content |
102
+ | Llama-3.3-Swallow-70B-Instruct-v0.4 | SambaNova (`sn`) | Mandatory; [get here](https://cloud.sambanova.ai/apis) | Fast, shorter |
103
+ | DeepSeek V3-0324 | Together AI (`to`) | Mandatory; [get here](https://api.together.ai/settings/api-keys) | Slower, medium-length |
104
+ | Llama 3.3 70B Instruct Turbo | Together AI (`to`) | Mandatory; [get here](https://api.together.ai/settings/api-keys) | Slower, detailed |
105
+ | Llama 3.1 8B Instruct Turbo 128K | Together AI (`to`) | Mandatory; [get here](https://api.together.ai/settings/api-keys) | Faster, shorter |
106
 
107
  > **IMPORTANT**: SlideDeck AI does **NOT** store your API keys/tokens or transmit them elsewhere. If you provide your API key, it is only used to invoke the relevant LLM to generate contents. That's it! This is an
108
  Open-Source project, so feel free to audit the code and convince yourself.
 
154
  streamlit run ./app.py # Run the application
155
  ```
156
 
157
+ > 💡If you have cloned the repository locally but cannot open and view the PPTX templates, you may need to run `git lfs pull` to download the template files. Without this, although content generation will work, the slide deck cannot be created.
158
 
159
  The `.env` file should be created inside the `slide-deck-ai` directory.
160
 
app.py CHANGED
@@ -541,12 +541,5 @@ def _display_download_button(file_path: pathlib.Path):
541
  )
542
 
543
 
544
- def main():
545
- """
546
- Trigger application run.
547
- """
548
- build_ui()
549
-
550
-
551
  if __name__ == '__main__':
552
- main()
 
541
  )
542
 
543
 
 
 
 
 
 
 
 
544
  if __name__ == '__main__':
545
+ build_ui()
src/slidedeckai/global_config.py CHANGED
@@ -14,6 +14,7 @@ load_dotenv()
14
 
15
  _SRC_DIR = Path(__file__).resolve().parent
16
 
 
17
  @dataclass(frozen=True)
18
  class GlobalConfig:
19
  """
@@ -24,6 +25,7 @@ class GlobalConfig:
24
  PROVIDER_COHERE = 'co'
25
  PROVIDER_GOOGLE_GEMINI = 'gg'
26
  PROVIDER_OLLAMA = 'ol'
 
27
  PROVIDER_OPENROUTER = 'or'
28
  PROVIDER_TOGETHER_AI = 'to'
29
  PROVIDER_SAMBANOVA = 'sn'
@@ -37,6 +39,7 @@ class GlobalConfig:
37
  PROVIDER_SAMBANOVA: 'sambanova',
38
  PROVIDER_TOGETHER_AI: 'together_ai',
39
  PROVIDER_OLLAMA: 'ollama',
 
40
  }
41
 
42
  VALID_PROVIDERS = {
@@ -45,6 +48,7 @@ class GlobalConfig:
45
  PROVIDER_COHERE,
46
  PROVIDER_GOOGLE_GEMINI,
47
  PROVIDER_OLLAMA,
 
48
  PROVIDER_OPENROUTER,
49
  PROVIDER_SAMBANOVA,
50
  PROVIDER_TOGETHER_AI,
@@ -54,6 +58,7 @@ class GlobalConfig:
54
  PROVIDER_COHERE: 'COHERE_API_KEY',
55
  PROVIDER_GOOGLE_GEMINI: 'GOOGLE_API_KEY',
56
  PROVIDER_AZURE_OPENAI: 'AZURE_OPENAI_API_KEY',
 
57
  PROVIDER_OPENROUTER: 'OPENROUTER_API_KEY',
58
  PROVIDER_SAMBANOVA: 'SAMBANOVA_API_KEY',
59
  PROVIDER_TOGETHER_AI: 'TOGETHER_API_KEY',
@@ -95,6 +100,21 @@ class GlobalConfig:
95
  'max_new_tokens': 8192,
96
  'paid': True,
97
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  '[or]google/gemini-2.0-flash-001': {
99
  'description': 'Google Gemini-2.0-flash-001 (via OpenRouter)',
100
  'max_new_tokens': 8192,
@@ -105,6 +125,11 @@ class GlobalConfig:
105
  'max_new_tokens': 4096,
106
  'paid': True,
107
  },
 
 
 
 
 
108
  '[sn]Llama-3.3-Swallow-70B-Instruct-v0.4': {
109
  'description': 'fast, shorter',
110
  'max_new_tokens': 8192,
@@ -128,11 +153,13 @@ class GlobalConfig:
128
  }
129
  LLM_PROVIDER_HELP = (
130
  'LLM provider codes:\n\n'
 
131
  '- **[az]**: Azure OpenAI\n'
132
  '- **[co]**: Cohere\n'
133
  '- **[gg]**: Google Gemini API\n'
134
- # '- **[hf]**: Hugging Face Inference API\n'
135
  '- **[or]**: OpenRouter\n\n'
 
136
  '- **[to]**: Together AI\n\n'
137
  '[Find out more](https://github.com/barun-saha/slide-deck-ai?tab=readme-ov-file#summary-of-the-llms)'
138
  )
@@ -193,13 +220,13 @@ class GlobalConfig:
193
  '\n\nSlideDeck AI can algo generate a presentation based on a PDF file. You can upload'
194
  ' a PDF file using the chat widget. Only a single file and up to max 50 pages will be'
195
  ' considered. For PDF-based slide deck generation, LLMs with large context windows, such'
196
- ' as Gemini, GPT, and Mistral-Nemo, are recommended. Note: images from the PDF files will'
197
  ' not be used.'
198
  '\n\nAlso, note that the uploaded file might disappear from the page after click.'
199
  ' You do not need to upload the same file again to continue'
200
  ' the interaction and refining—the contents of the PDF file will be retained in the'
201
  ' same interactive session.'
202
- '\n\nCurrently, paid or *free-to-use* LLMs from six different providers are supported.'
203
  ' A [summary of the supported LLMs]('
204
  'https://github.com/barun-saha/slide-deck-ai/blob/main/README.md#summary-of-the-llms)'
205
  ' is available for reference. SlideDeck AI does **NOT** store your API keys.'
 
14
 
15
  _SRC_DIR = Path(__file__).resolve().parent
16
 
17
+
18
  @dataclass(frozen=True)
19
  class GlobalConfig:
20
  """
 
25
  PROVIDER_COHERE = 'co'
26
  PROVIDER_GOOGLE_GEMINI = 'gg'
27
  PROVIDER_OLLAMA = 'ol'
28
+ PROVIDER_OPENAI = 'oa'
29
  PROVIDER_OPENROUTER = 'or'
30
  PROVIDER_TOGETHER_AI = 'to'
31
  PROVIDER_SAMBANOVA = 'sn'
 
39
  PROVIDER_SAMBANOVA: 'sambanova',
40
  PROVIDER_TOGETHER_AI: 'together_ai',
41
  PROVIDER_OLLAMA: 'ollama',
42
+ PROVIDER_OPENAI: 'openai',
43
  }
44
 
45
  VALID_PROVIDERS = {
 
48
  PROVIDER_COHERE,
49
  PROVIDER_GOOGLE_GEMINI,
50
  PROVIDER_OLLAMA,
51
+ PROVIDER_OPENAI,
52
  PROVIDER_OPENROUTER,
53
  PROVIDER_SAMBANOVA,
54
  PROVIDER_TOGETHER_AI,
 
58
  PROVIDER_COHERE: 'COHERE_API_KEY',
59
  PROVIDER_GOOGLE_GEMINI: 'GOOGLE_API_KEY',
60
  PROVIDER_AZURE_OPENAI: 'AZURE_OPENAI_API_KEY',
61
+ PROVIDER_OPENAI: 'OPENAI_API_KEY',
62
  PROVIDER_OPENROUTER: 'OPENROUTER_API_KEY',
63
  PROVIDER_SAMBANOVA: 'SAMBANOVA_API_KEY',
64
  PROVIDER_TOGETHER_AI: 'TOGETHER_API_KEY',
 
100
  'max_new_tokens': 8192,
101
  'paid': True,
102
  },
103
+ '[oa]gpt-4.1-mini': {
104
+ 'description': 'faster, medium',
105
+ 'max_new_tokens': 8192,
106
+ 'paid': True,
107
+ },
108
+ '[oa]gpt-4.1-nano': {
109
+ 'description': 'faster, shorter',
110
+ 'max_new_tokens': 8192,
111
+ 'paid': True,
112
+ },
113
+ '[oa]gpt-5-nano': {
114
+ 'description': 'slow, shorter',
115
+ 'max_new_tokens': 8192,
116
+ 'paid': True,
117
+ },
118
  '[or]google/gemini-2.0-flash-001': {
119
  'description': 'Google Gemini-2.0-flash-001 (via OpenRouter)',
120
  'max_new_tokens': 8192,
 
125
  'max_new_tokens': 4096,
126
  'paid': True,
127
  },
128
+ '[sn]DeepSeek-V3.1-Terminus': {
129
+ 'description': 'fast, detailed',
130
+ 'max_new_tokens': 8192,
131
+ 'paid': True,
132
+ },
133
  '[sn]Llama-3.3-Swallow-70B-Instruct-v0.4': {
134
  'description': 'fast, shorter',
135
  'max_new_tokens': 8192,
 
153
  }
154
  LLM_PROVIDER_HELP = (
155
  'LLM provider codes:\n\n'
156
+ '- **[an]**: Anthropic\n'
157
  '- **[az]**: Azure OpenAI\n'
158
  '- **[co]**: Cohere\n'
159
  '- **[gg]**: Google Gemini API\n'
160
+ '- **[oa]**: OpenAI\n'
161
  '- **[or]**: OpenRouter\n\n'
162
+ '- **[sn]**: SambaNova\n'
163
  '- **[to]**: Together AI\n\n'
164
  '[Find out more](https://github.com/barun-saha/slide-deck-ai?tab=readme-ov-file#summary-of-the-llms)'
165
  )
 
220
  '\n\nSlideDeck AI can algo generate a presentation based on a PDF file. You can upload'
221
  ' a PDF file using the chat widget. Only a single file and up to max 50 pages will be'
222
  ' considered. For PDF-based slide deck generation, LLMs with large context windows, such'
223
+ ' as Gemini and GPT, are recommended. Note: images from the PDF files will'
224
  ' not be used.'
225
  '\n\nAlso, note that the uploaded file might disappear from the page after click.'
226
  ' You do not need to upload the same file again to continue'
227
  ' the interaction and refining—the contents of the PDF file will be retained in the'
228
  ' same interactive session.'
229
+ '\n\nCurrently, paid or *free-to-use* LLMs from eight different providers are supported.'
230
  ' A [summary of the supported LLMs]('
231
  'https://github.com/barun-saha/slide-deck-ai/blob/main/README.md#summary-of-the-llms)'
232
  ' is available for reference. SlideDeck AI does **NOT** store your API keys.'