Skip to content

Commit 1e9854b

Browse files
committed
Add new store apps
1 parent 30e8307 commit 1e9854b

9 files changed

+587
-4
lines changed

docker/api/docker-entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ apiserver() {
1616
python manage.py createcachetable
1717
fi
1818

19-
if [ "x$DJANGO_MANAGEPY_CLEARCACHE" != 'xoff' ]; then
20-
python manage.py clearcache
21-
fi
22-
2319
if [ "x$DJANGO_MANAGEPY_LOADSTOREAPPS" = 'xon' ]; then
2420
python manage.py loadstoreapps
2521
fi
22+
23+
if [ "x$DJANGO_MANAGEPY_CLEARCACHE" != 'xoff' ]; then
24+
python manage.py clearcache
25+
fi
2626

2727
if [ "x$AUTORELOAD" = 'xFalse' ] && [ "x$SINGLE_THREAD" = 'xTrue' ]; then
2828
python manage.py runserver --nothreading --noreload 0.0.0.0:9000
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
name: File Summarizer
2+
slug: file-summarizer
3+
description: Summarize the content of a file using chain of density method
4+
icon: file_summarizer_icon.png
5+
categories:
6+
- utilities
7+
- productivity
8+
config:
9+
layout: |-
10+
<pa-layout sx='{"maxWidth": "1200px", "margin": "10px auto"}'>
11+
<pa-paper style="padding: 10px;">
12+
<pa-grid container="true" spacing="2" style="width: 100%">
13+
<pa-grid item="true" xs="12">
14+
<pa-input-form workflow="true"></pa-input-form>
15+
</pa-grid>
16+
<pa-grid item="true" xs="12">
17+
<br/>
18+
</pa-grid>
19+
<pa-grid item="true" xs="12">
20+
<pa-workflow-output showHeader="true"></pa-workflow-output>
21+
</pa-grid>
22+
</pa-grid>
23+
</pa-paper>
24+
</pa-layout>
25+
allowed_sites: []
26+
input_template: ""
27+
type_slug: web
28+
processors:
29+
- id: data_uri_text_extract1
30+
name: File Extractor
31+
input:
32+
file: ""
33+
query: ""
34+
file_data: "{{_inputs0.file}}"
35+
config:
36+
document_limit: 1
37+
text_chunk_size: 1500
38+
description: Extract text from file represened as data uri
39+
input_fields: []
40+
provider_slug: promptly
41+
processor_slug: data_uri_text_extract
42+
output_template:
43+
markdown: "{{text}}"
44+
- id: llm2
45+
name: Chat Completions
46+
input:
47+
input_message: |-
48+
{{_inputs0.content_category}}
49+
---
50+
51+
{{data_uri_text_extract1.text}}
52+
config:
53+
seed: null
54+
objref: false
55+
max_tokens: 2888
56+
max_history: 5
57+
temperature: 0
58+
retain_history: false
59+
system_message: >
60+
As an expert copy-writer, you will write concise, entity-dense summaries
61+
of the user provided {{_inputs0.content_category}}. The summary should
62+
be under {{_inputs0.max_words}} words and contain 2-3 informative
63+
Descriptive Entities from the {{_inputs0.content_category}}.
64+
65+
66+
A Descriptive Entity is:
67+
68+
- Relevant: to the main content.
69+
70+
- Specific: descriptive yet concise (5 words or fewer).
71+
72+
- Faithful: present in the {{_inputs0.content_category}}
73+
74+
- Anywhere: located anywhere in the {{_inputs0.content_category}}.
75+
76+
77+
# Your Summarization Process
78+
79+
- Read through the {{_inputs0.content_category}} and the all the below
80+
sections to get an understanding of the task.
81+
82+
- Pick 2-3 informative Descriptive Entities from the
83+
{{_inputs0.content_category}} (";" delimited, do not add spaces).
84+
85+
- In your output JSON list of dictionaries, write an initial summary of
86+
max {{_inputs0.max_words}} words containing the Entities.
87+
88+
- You now have `[{"missing_entities": "...", "denser_summary": "..."}]`
89+
90+
91+
Then, repeat the below 2 steps 3 times:
92+
93+
- Step 1. In a new dict in the same list, identify 2-3 new informative
94+
Descriptive Entities from the {{_inputs0.content_category}} which are
95+
missing from the previously generated summary.
96+
97+
98+
- Step 2. Write a new, denser summary of identical length which covers
99+
every Entity and detail from the previous summary plus the new Missing
100+
Entities.
101+
102+
103+
A Missing Entity is:
104+
105+
- An informative Descriptive Entity from the
106+
{{_inputs0.content_category}} as defined above.
107+
108+
- Novel: not in the previous summary.
109+
110+
111+
# Guidelines
112+
113+
- The first summary should be long (max {{_inputs0.max_words}} words)
114+
yet highly non-specific, containing little information beyond the
115+
Entities marked as missing. Use overly verbose language and fillers
116+
(e.g., "this {{_inputs0.content_category}} discusses") to reach
117+
~{{_inputs0.max_words}} words.
118+
119+
120+
- Make every word count: re-write the previous summary to improve flow
121+
and make space for additional entities.
122+
123+
- Make space with fusion, compression, and removal of uninformative
124+
phrases like "the {{_inputs0.content_category}} discusses".
125+
126+
- The summaries should become highly dense and concise yet
127+
self-contained, e.g., easily understood without the
128+
{{_inputs0.content_category}}.
129+
130+
- Missing entities can appear anywhere in the new summary.
131+
132+
- Never drop entities from the previous summary. If space cannot be
133+
made, add fewer new entities.
134+
135+
- You're finished when your JSON list has 4 dictionaries of increasing
136+
density.
137+
138+
139+
# IMPORTANT
140+
141+
- Remember, to keep each summary to max {{_inputs0.max_words}} words.
142+
143+
- Never remove Entities or details. Only add more from the
144+
{{_inputs0.content_category}}.
145+
146+
- Do not discuss the {{_inputs0.content_category}} itself, focus on the
147+
content: informative Descriptive Entities, and details.
148+
149+
- Remember, if you're overusing filler phrases in later summaries, or
150+
discussing the {{_inputs0.content_category}} itself, not its contents,
151+
choose more informative Descriptive Entities and include more details
152+
from the {{_inputs0.content_category}}.
153+
154+
155+
- Answer with a minified JSON list of dictionaries with keys
156+
"missing_entities" and "denser_summary".
157+
158+
![Source]
159+
(https://smith.langchain.com/hub/iamrobotbear/chain-of-density-prompt)
160+
161+
## Example output
162+
163+
164+
[{"missing_entities": "ent1;ent2", "denser_summary": "<vague initial
165+
summary with entities 'ent1','ent2'>"}, {"missing_entities": "ent3",
166+
"denser_summary": "denser summary with 'ent1','ent2','ent3'"}, ...]
167+
provider_config:
168+
model: gpt-4o-mini
169+
provider: openai
170+
description: LLM Chat completions processor
171+
input_fields: []
172+
provider_slug: promptly
173+
processor_slug: llm
174+
output_template:
175+
markdown: "{{text}}"
176+
- id: llm3
177+
name: Chat Completions
178+
input:
179+
input_message: "{{llm2.text}}"
180+
config:
181+
seed: null
182+
objref: false
183+
max_tokens: 2859
184+
max_history: 5
185+
temperature: 0
186+
retain_history: false
187+
system_message: >-
188+
As an expert copy-writer, you will write concise, summaries of the user
189+
provided {{_inputs0.content_category}}. You are provided a json list of
190+
entity dense summaries along with a description entity and missing
191+
entities.
192+
193+
A Descriptive Entity is:
194+
195+
- Relevant: to the main content.
196+
197+
- Specific: descriptive yet concise (5 words or fewer).
198+
199+
- Faithful: present in the {{_inputs0.content_category}}
200+
201+
- Anywhere: located anywhere in the {{_inputs0.content_category}}.
202+
203+
204+
The last entry in the list will have to most concise and information
205+
rich summary. Use that to output a final summary. Only provide the final
206+
summary of {{_inputs0.max_words}} words
207+
provider_config:
208+
model: gpt-4o
209+
provider: openai
210+
description: LLM Chat completions processor
211+
input_fields: []
212+
provider_slug: promptly
213+
processor_slug: llm
214+
output_template:
215+
markdown: "{{text}}"
216+
input_fields:
217+
- name: file
218+
type: file
219+
title: File
220+
required: true
221+
description: Provide the file to summarize
222+
- name: content_category
223+
type: string
224+
title: content_category
225+
default: Article
226+
required: true
227+
description: Content Category
228+
- name: max_words
229+
type: string
230+
title: max_words
231+
default: "200"
232+
required: true
233+
description: Max words
234+
output_template:
235+
markdown: " {{llm3.text}}"
236+
version: "0.0.1"
92.6 KB
Loading
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Marketing Content Generator
2+
slug: marketing-content-generator
3+
description: >-
4+
"Marketing Content Generator" is your go-to web app for creating compelling marketing content quickly and efficiently. With the power of OpenAI's advanced text generation capabilities from the latest GPT-4 model, this app can help you effortlessly generate engaging messages for your campaigns. Say goodbye to writer's block and let this app supercharge your content creation process!
5+
icon: marketing_content_generator_icon.png
6+
categories:
7+
- utilities
8+
- productivity
9+
config: {}
10+
type_slug: web
11+
processors:
12+
- id: _inputs1
13+
name: ChatGPT
14+
input:
15+
messages:
16+
- name: ""
17+
role: user
18+
content: >-
19+
Create a {{_inputs0.format}} for {{_inputs0.product_name}} . The
20+
content will be posted on {{_inputs0.platform}} . Consider the
21+
following characteristics when generating the content:
22+
23+
1. Tone of the content should be {{_inputs0.tone}}
24+
25+
2. messaging {{_inputs0.messaging}}
26+
27+
3. Messaging is the 4. Limit the content generated to a maximum of
28+
400 words
29+
function_call:
30+
name: ""
31+
arguments: ""
32+
chat_history: []
33+
system_message: >-
34+
You are an AI language model, and your task is to to act as a Marketing
35+
Content Generator. Your task is to create engaging marketing content.
36+
Please generate the content ensuring that it contributes to a
37+
comprehensive marketing strategy.
38+
config:
39+
"n": 1
40+
stop: null
41+
model: gpt-4o
42+
top_p: 1
43+
stream: true
44+
logit_bias: {}
45+
max_tokens: 2459
46+
temperature: 0.7
47+
function_call: null
48+
retain_history: false
49+
presence_penalty: 0
50+
frequency_penalty: 0
51+
auto_prune_chat_history: false
52+
description: >-
53+
Takes a series of messages as input, and return a model-generated message
54+
as output
55+
provider_slug: openai
56+
processor_slug: chatgpt
57+
output_template: {}
58+
input_fields:
59+
- name: format
60+
type: select
61+
title: Format
62+
options:
63+
- label: Blog Post
64+
value: Blog Post
65+
- label: LinkedIn Post
66+
value: LinkedIn Post
67+
- label: Instagram Post
68+
value: Instagram Post
69+
- label: Landing Page
70+
value: Landing Page
71+
- label: Facebook Post
72+
value: Facebook Post
73+
- label: Video Script
74+
value: Video Script
75+
- label: Product Description
76+
value: Product Description
77+
- label: Press Release
78+
value: Press Release
79+
- label: Newsletter
80+
value: Newsletter
81+
- label: Case Study
82+
value: Case Study
83+
description: Specify the marketing content format
84+
- name: messaging
85+
type: text
86+
title: Messaging
87+
description: >-
88+
The key messages or value proposition that the content conveys to the
89+
audience, such as highlighting the benefits of a product or service or
90+
addressing a pain point etc.,
91+
- name: product_name
92+
type: string
93+
title: Product Name
94+
description: Name of the product you want to generate content for
95+
- name: tone
96+
type: select
97+
title: Tone
98+
options:
99+
- label: Formal
100+
value: Formal
101+
- label: Casual
102+
value: Casual
103+
- label: Professional
104+
value: Professional
105+
- label: Humorous
106+
value: Humorous
107+
- label: Informative
108+
value: Informative
109+
description: Set the tone for the content
110+
output_template:
111+
markdown: |
112+
{{_inputs1.choices[0].content}}
113+
version: "0.0.1"
116 KB
Loading

0 commit comments

Comments
 (0)