Skip to content

Commit a184f44

Browse files
committed
Updated prompt generation and the docker configuration
1 parent cdbbbc7 commit a184f44

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

docker-compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
# Database volume - persists user data, documents, and snapshots
1414
- writing_assistant_db:/app/data
1515
env_file:
16-
- .env
16+
- .env.podman.NOCOMMIT
1717
environment:
1818
- WRITING_ASSISTANT_HOST=0.0.0.0
1919
- WRITING_ASSISTANT_PORT=8001
@@ -27,6 +27,8 @@ services:
2727
timeout: 10s
2828
retries: 3
2929
start_period: 60s
30+
extra_hosts: # <--- ADD THIS
31+
- "host.containers.internal:host-gateway"
3032
networks:
3133
- writing-assistant-network
3234

@@ -44,7 +46,7 @@ services:
4446
- writing_assistant_dev_cache:/home/builder/.cache
4547
- writing_assistant_dev_db:/app/data
4648
env_file:
47-
- .env
49+
- .env.podman.NOCOMMIT
4850
environment:
4951
- WRITING_ASSISTANT_HOST=0.0.0.0
5052
- WRITING_ASSISTANT_PORT=8001
@@ -53,6 +55,8 @@ services:
5355
- PYTHONUNBUFFERED=1
5456
working_dir: /app
5557
command: ["python", "-m", "uvicorn", "src.writing_assistant.app.main:app", "--host", "0.0.0.0", "--port", "8001", "--reload"]
58+
extra_hosts: # <--- ADD THIS
59+
- "host.containers.internal:host-gateway"
5660
networks:
5761
- writing-assistant-network
5862
profiles:

src/writing_assistant/core/callbacks.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,26 @@ def get_system_prompt(generation_mode: str) -> str:
122122
Word Limit: {metadata.word_limit} words (approximate)
123123
124124
SURROUNDING CONTEXT:
125-
Previous paragraph: {prev_paragraph}
126125
127-
Current paragraph: {text}
126+
================================
128127
129-
Next paragraph: {next_paragraph}
128+
Previous paragraph:
129+
130+
{prev_paragraph}
131+
132+
================================
133+
134+
Current paragraph to assist with:
135+
136+
{text}
137+
138+
================================
139+
140+
Next paragraph:
141+
142+
{next_paragraph}
143+
144+
=================================
130145
131146
TASK: {generation_mode} the current paragraph using the context and requirements above.
132147
"""

0 commit comments

Comments
 (0)