s6bhatti commited on
Commit
535d2be
·
1 Parent(s): e235662

Add more example blueprints and update system prompt

Browse files
README.md CHANGED
@@ -48,11 +48,11 @@ pinned: false
48
 
49
  ### Finetuning the GPT model
50
 
51
- 1. Download `data/finetuning_data_cot_v8.jsonl` in the GitHub repository.
52
  2. Visit the [OpenAI Fine-tuning page](https://platform.openai.com/finetune) and click `+ Create` in the top right corner.
53
  3. Fill in the form with the following information, and leave the rest as default:
54
  - `Base Model`: `gpt-3.5-turbo-0125` (or any other model you prefer)
55
- - `Training data`: Upload the `finetuning_data_cot_v8.jsonl` file.
56
  - `Suffix`: NotionGPT (or any other name you prefer)
57
  4. Click `Create` and wait for the model to finish training.
58
  5. Once the model is trained, copy the model name and save it for later. (It should look something like `ft:gpt-3.5-turbo-0125:personal:notiongpt:<ID>`)
 
48
 
49
  ### Finetuning the GPT model
50
 
51
+ 1. Download `data/finetuning_data_cot_v9.jsonl` in the GitHub repository.
52
  2. Visit the [OpenAI Fine-tuning page](https://platform.openai.com/finetune) and click `+ Create` in the top right corner.
53
  3. Fill in the form with the following information, and leave the rest as default:
54
  - `Base Model`: `gpt-3.5-turbo-0125` (or any other model you prefer)
55
+ - `Training data`: Upload the `finetuning_data_cot_v9.jsonl` file.
56
  - `Suffix`: NotionGPT (or any other name you prefer)
57
  4. Click `Create` and wait for the model to finish training.
58
  5. Once the model is trained, copy the model name and save it for later. (It should look something like `ft:gpt-3.5-turbo-0125:personal:notiongpt:<ID>`)
blueprints/architect.py CHANGED
@@ -91,7 +91,7 @@ def process_blueprint(parent_id, block_json):
91
  def generate_blueprint(description, force_json=False, temperature=0.8, top_p=0.3, error=None, failed_response=None):
92
  system_prompt = """You are NotionGPT, a state-of-the-art template designer for Notion, programmed to create custom JSON blueprints that represent detailed, organized, and highly functional Notion templates. Your templates should be ready for users to use immediately and should meet their specific organizational needs, allowing users to customize them to suit their needs.
93
 
94
- Please respond ONLY with valid json that conforms to the `OpenAIResponse(BaseModel)` class as defined by pydantic:
95
 
96
  ```
97
  from __future__ import annotations
@@ -338,8 +338,7 @@ def generate_blueprint(description, force_json=False, temperature=0.8, top_p=0.3
338
  Quote.update_forward_refs()
339
  ```
340
 
341
- Do not include any additional text other than the object json as we will load this object with json.loads() and pydantic."""
342
-
343
  if error and failed_response:
344
  response = client.chat.completions.create(
345
  model=MODEL_NAME,
 
91
  def generate_blueprint(description, force_json=False, temperature=0.8, top_p=0.3, error=None, failed_response=None):
92
  system_prompt = """You are NotionGPT, a state-of-the-art template designer for Notion, programmed to create custom JSON blueprints that represent detailed, organized, and highly functional Notion templates. Your templates should be ready for users to use immediately and should meet their specific organizational needs, allowing users to customize them to suit their needs.
93
 
94
+ Please respond ONLY with valid json that conforms to the `OpenAIResponse(BaseModel)` class as defined by pydantic in the Python code below:
95
 
96
  ```
97
  from __future__ import annotations
 
338
  Quote.update_forward_refs()
339
  ```
340
 
341
+ Do not include any additional text other than the object json as we will load this object with json.loads() and pydantic. Additionally, make sure the Notion page structure you generate is complete and fully represents the rough outline described in the response."""
 
342
  if error and failed_response:
343
  response = client.chat.completions.create(
344
  model=MODEL_NAME,
data/example_blueprints.csv CHANGED
The diff for this file is too large to render. See raw diff
 
data/finetuning_data_cot_v8.jsonl DELETED
The diff for this file is too large to render. See raw diff
 
data/finetuning_data_cot_v9.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/process_data.py CHANGED
@@ -24,7 +24,7 @@ blueprints_df = pd.read_csv("./example_blueprints.csv", encoding="utf-8-sig")
24
 
25
  system_prompt = """You are NotionGPT, a state-of-the-art template designer for Notion, programmed to create custom JSON blueprints that represent detailed, organized, and highly functional Notion templates. Your templates should be ready for users to use immediately and should meet their specific organizational needs, allowing users to customize them to suit their needs.
26
 
27
- Please respond ONLY with valid json that conforms to the `OpenAIResponse(BaseModel)` class as defined by pydantic:
28
 
29
  ```
30
  from __future__ import annotations
@@ -271,7 +271,7 @@ Callout.update_forward_refs()
271
  Quote.update_forward_refs()
272
  ```
273
 
274
- Do not include any additional text other than the object json as we will load this object with json.loads() and pydantic."""
275
 
276
  messages = []
277
  for _, row in blueprints_df.iterrows():
@@ -292,6 +292,6 @@ for _, row in blueprints_df.iterrows():
292
  }
293
  messages.append(entry)
294
 
295
- with open("finetuning_data_cot_v8.jsonl", "w") as f:
296
  for message in messages:
297
  print(json.dumps(message, ensure_ascii=False), file=f)
 
24
 
25
  system_prompt = """You are NotionGPT, a state-of-the-art template designer for Notion, programmed to create custom JSON blueprints that represent detailed, organized, and highly functional Notion templates. Your templates should be ready for users to use immediately and should meet their specific organizational needs, allowing users to customize them to suit their needs.
26
 
27
+ Please respond ONLY with valid json that conforms to the `OpenAIResponse(BaseModel)` class as defined by pydantic in the Python code below:
28
 
29
  ```
30
  from __future__ import annotations
 
271
  Quote.update_forward_refs()
272
  ```
273
 
274
+ Do not include any additional text other than the object json as we will load this object with json.loads() and pydantic. Additionally, make sure the Notion page structure you generate is complete and fully represents the rough outline described in the response."""
275
 
276
  messages = []
277
  for _, row in blueprints_df.iterrows():
 
292
  }
293
  messages.append(entry)
294
 
295
+ with open("finetuning_data_cot_v9.jsonl", "w") as f:
296
  for message in messages:
297
  print(json.dumps(message, ensure_ascii=False), file=f)