Skip to content

Commit 7f3bae4

Browse files
committed
chore: Update project configuration and dependencies
- Updated project configuration to remove dependencies on `openai` and `anthropic` - Refactored code related to setting API keys and removed unnecessary configuration options - Removed redundant files and updated package versions in `requirements.txt`
1 parent 690c376 commit 7f3bae4

File tree

8 files changed

+1
-253
lines changed

8 files changed

+1
-253
lines changed

.transcribe.yaml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
use_assemblyai: true
22

3-
openai:
4-
models:
5-
- temperature: 0.1
6-
max_tokens: 2048
7-
model: gpt-4
8-
system_prompt: Generate a summary with key points in bold and a Next Steps section,
9-
use Markdown, be a concise tech expert but kind to non-technical readers.
10-
- temperature: 0.3
11-
max_tokens: 2048
12-
model: gpt-4
13-
system_prompt: Generate a summary with key points in bold and a Next Steps section,
14-
use Markdown, be a concise tech expert but kind to non-technical readers.
15-
- temperature: 0.5
16-
max_tokens: 2048
17-
model: gpt-4
18-
system_prompt: Generate a summary with key points in bold and a Next Steps section,
19-
use Markdown, be a concise tech expert but kind to non-technical readers.
20-
anthropic:
21-
models:
22-
- temperature: 0.1
23-
max_tokens: 2048
24-
model: claude-3-sonnet-20240229
25-
system_prompt: Generate a summary with key points in bold and a Next Steps section,
26-
use Markdown, be a concise tech expert but kind to non-technical readers.
27-
- temperature: 0.3
28-
max_tokens: 2048
29-
model: claude-3-sonnet-20240229
30-
system_prompt: Generate a summary with key points in bold and a Next Steps section,
31-
use Markdown, be a concise tech expert but kind to non-technical readers.
32-
- temperature: 0.5
33-
max_tokens: 2048
34-
model: claude-3-sonnet-20240229
35-
system_prompt: Generate a summary with key points in bold and a Next Steps section,
36-
use Markdown, be a concise tech expert but kind to non-technical readers.
373
input_folder: input
384
output_folder: output

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ dependencies = [
2121
"halo",
2222
"yamale",
2323
"tenacity",
24-
"openai",
25-
"anthropic",
2624
]
2725

2826
[project.urls]

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
annotated-types==0.6.0
2-
anthropic==0.21.3
32
anyio==4.4.0
43
argcomplete==3.2.3
54
assemblyai==0.34.0

transcribe_me/cli.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import argparse
22
from transcribe_me.config import config_manager
33
from transcribe_me.audio import transcription
4-
from transcribe_me.summarization import summarizer
54

65

76
def parse_arguments():
@@ -11,7 +10,7 @@ def parse_arguments():
1110
parser.add_argument(
1211
"command",
1312
nargs="?",
14-
choices=["install", "archive", "only"],
13+
choices=["install", "archive"],
1514
help="Install the configuration file or archive files.",
1615
)
1716
parser.add_argument(
@@ -45,12 +44,7 @@ def main():
4544
input_folder = args.input
4645
output_folder = args.output
4746

48-
if args.command == "only":
49-
transcription.process_audio_files(input_folder, output_folder, config)
50-
return
51-
5247
transcription.process_audio_files(input_folder, output_folder, config)
53-
summarizer.generate_summaries(input_folder, output_folder, config)
5448

5549

5650
if __name__ == "__main__":

transcribe_me/config/config_manager.py

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from colorama import Fore
99

1010
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
11-
ANTHROPIC_API_KEY = os.environ.get("ANTHROPIC_API_KEY")
1211
ASSEMBLYAI_API_KEY = os.environ.get("ASSEMBLYAI_API_KEY")
1312

1413
DEFAULT_OUTPUT_FOLDER = "output"
@@ -65,62 +64,6 @@ def install_config() -> None:
6564

6665
config = {
6766
"use_assemblyai": False,
68-
"openai": {
69-
"models": [
70-
{
71-
"temperature": 0.1,
72-
"max_tokens": 2048,
73-
"model": "gpt-4",
74-
"system_prompt": """
75-
Generate a summary with key points in bold and a Next Steps section, use Markdown, be a concise tech expert but kind to non-technical readers.
76-
""",
77-
},
78-
{
79-
"temperature": 0.3,
80-
"max_tokens": 2048,
81-
"model": "gpt-4",
82-
"system_prompt": """
83-
Generate a summary with key points in bold and a Next Steps section, use Markdown, be a concise tech expert but kind to non-technical readers.
84-
""",
85-
},
86-
{
87-
"temperature": 0.5,
88-
"max_tokens": 2048,
89-
"model": "gpt-4",
90-
"system_prompt": """
91-
Generate a summary with key points in bold and a Next Steps section, use Markdown, be a concise tech expert but kind to non-technical readers.
92-
""",
93-
},
94-
]
95-
},
96-
"anthropic": {
97-
"models": [
98-
{
99-
"temperature": 0.1,
100-
"max_tokens": 2048,
101-
"model": "claude-3-sonnet-20240229",
102-
"system_prompt": """
103-
Generate a summary with key points in bold and a Next Steps section, use Markdown, be a concise tech expert but kind to non-technical readers.
104-
""",
105-
},
106-
{
107-
"temperature": 0.3,
108-
"max_tokens": 2048,
109-
"model": "claude-3-sonnet-20240229",
110-
"system_prompt": """
111-
Generate a summary with key points in bold and a Next Steps section, use Markdown, be a concise tech expert but kind to non-technical readers.
112-
""",
113-
},
114-
{
115-
"temperature": 0.5,
116-
"max_tokens": 2048,
117-
"model": "claude-3-sonnet-20240229",
118-
"system_prompt": """
119-
Generate a summary with key points in bold and a Next Steps section, use Markdown, be a concise tech expert but kind to non-technical readers.
120-
""",
121-
},
122-
]
123-
},
12467
"input_folder": DEFAULT_INPUT_FOLDER,
12568
"output_folder": DEFAULT_OUTPUT_FOLDER,
12669
}
@@ -133,14 +76,6 @@ def install_config() -> None:
13376
os.environ["OPENAI_API_KEY"] = openai_key
13477
append_to_shell_profile(f"export OPENAI_API_KEY={openai_key}")
13578

136-
if not ANTHROPIC_API_KEY:
137-
print(
138-
f"{Fore.YELLOW}Looks like you haven't set your Anthropic API key. We'll set it up for you."
139-
)
140-
anthropic_key = input(f"{Fore.CYAN}Enter your Anthropic API key: ")
141-
os.environ["ANTHROPIC_API_KEY"] = anthropic_key
142-
append_to_shell_profile(f"export ANTHROPIC_API_KEY={anthropic_key}")
143-
14479
if not ASSEMBLYAI_API_KEY:
14580
print(
14681
f"{Fore.YELLOW}Looks like you haven't set your AssemblyAI API key. We'll set it up for you."

transcribe_me/config/schema.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
use_assemblyai: bool()
2-
openai:
3-
models: list(include('model'), min=1)
4-
anthropic:
5-
models: list(include('model'), min=1)
62
input_folder: str()
73
output_folder: str()
8-
---
9-
model:
10-
temperature: num(min=0, max=1)
11-
max_tokens: int(min=1)
12-
model: str()
13-
system_prompt: str()

transcribe_me/summarization/__init__.py

Whitespace-only changes.

transcribe_me/summarization/summarizer.py

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)