npcpy 1.0.26__py3-none-any.whl → 1.2.32__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- npcpy/__init__.py +0 -7
- npcpy/data/audio.py +16 -99
- npcpy/data/image.py +43 -42
- npcpy/data/load.py +83 -124
- npcpy/data/text.py +28 -28
- npcpy/data/video.py +8 -32
- npcpy/data/web.py +51 -23
- npcpy/ft/diff.py +110 -0
- npcpy/ft/ge.py +115 -0
- npcpy/ft/memory_trainer.py +171 -0
- npcpy/ft/model_ensembler.py +357 -0
- npcpy/ft/rl.py +360 -0
- npcpy/ft/sft.py +248 -0
- npcpy/ft/usft.py +128 -0
- npcpy/gen/audio_gen.py +24 -0
- npcpy/gen/embeddings.py +13 -13
- npcpy/gen/image_gen.py +262 -117
- npcpy/gen/response.py +615 -415
- npcpy/gen/video_gen.py +53 -7
- npcpy/llm_funcs.py +1869 -437
- npcpy/main.py +1 -1
- npcpy/memory/command_history.py +844 -510
- npcpy/memory/kg_vis.py +833 -0
- npcpy/memory/knowledge_graph.py +892 -1845
- npcpy/memory/memory_processor.py +81 -0
- npcpy/memory/search.py +188 -90
- npcpy/mix/debate.py +192 -3
- npcpy/npc_compiler.py +1672 -801
- npcpy/npc_sysenv.py +593 -1266
- npcpy/serve.py +3120 -0
- npcpy/sql/ai_function_tools.py +257 -0
- npcpy/sql/database_ai_adapters.py +186 -0
- npcpy/sql/database_ai_functions.py +163 -0
- npcpy/sql/model_runner.py +19 -19
- npcpy/sql/npcsql.py +706 -507
- npcpy/sql/sql_model_compiler.py +156 -0
- npcpy/tools.py +183 -0
- npcpy/work/plan.py +13 -279
- npcpy/work/trigger.py +3 -3
- npcpy-1.2.32.dist-info/METADATA +803 -0
- npcpy-1.2.32.dist-info/RECORD +54 -0
- npcpy/data/dataframes.py +0 -171
- npcpy/memory/deep_research.py +0 -125
- npcpy/memory/sleep.py +0 -557
- npcpy/modes/_state.py +0 -78
- npcpy/modes/alicanto.py +0 -1075
- npcpy/modes/guac.py +0 -785
- npcpy/modes/mcp_npcsh.py +0 -822
- npcpy/modes/npc.py +0 -213
- npcpy/modes/npcsh.py +0 -1158
- npcpy/modes/plonk.py +0 -409
- npcpy/modes/pti.py +0 -234
- npcpy/modes/serve.py +0 -1637
- npcpy/modes/spool.py +0 -312
- npcpy/modes/wander.py +0 -549
- npcpy/modes/yap.py +0 -572
- npcpy/npc_team/alicanto.npc +0 -2
- npcpy/npc_team/alicanto.png +0 -0
- npcpy/npc_team/assembly_lines/test_pipeline.py +0 -181
- npcpy/npc_team/corca.npc +0 -13
- npcpy/npc_team/foreman.npc +0 -7
- npcpy/npc_team/frederic.npc +0 -6
- npcpy/npc_team/frederic4.png +0 -0
- npcpy/npc_team/guac.png +0 -0
- npcpy/npc_team/jinxs/automator.jinx +0 -18
- npcpy/npc_team/jinxs/bash_executer.jinx +0 -31
- npcpy/npc_team/jinxs/calculator.jinx +0 -11
- npcpy/npc_team/jinxs/edit_file.jinx +0 -96
- npcpy/npc_team/jinxs/file_chat.jinx +0 -14
- npcpy/npc_team/jinxs/gui_controller.jinx +0 -28
- npcpy/npc_team/jinxs/image_generation.jinx +0 -29
- npcpy/npc_team/jinxs/internet_search.jinx +0 -30
- npcpy/npc_team/jinxs/local_search.jinx +0 -152
- npcpy/npc_team/jinxs/npcsh_executor.jinx +0 -31
- npcpy/npc_team/jinxs/python_executor.jinx +0 -8
- npcpy/npc_team/jinxs/screen_cap.jinx +0 -25
- npcpy/npc_team/jinxs/sql_executor.jinx +0 -33
- npcpy/npc_team/kadiefa.npc +0 -3
- npcpy/npc_team/kadiefa.png +0 -0
- npcpy/npc_team/npcsh.ctx +0 -9
- npcpy/npc_team/npcsh_sibiji.png +0 -0
- npcpy/npc_team/plonk.npc +0 -2
- npcpy/npc_team/plonk.png +0 -0
- npcpy/npc_team/plonkjr.npc +0 -2
- npcpy/npc_team/plonkjr.png +0 -0
- npcpy/npc_team/sibiji.npc +0 -5
- npcpy/npc_team/sibiji.png +0 -0
- npcpy/npc_team/spool.png +0 -0
- npcpy/npc_team/templates/analytics/celona.npc +0 -0
- npcpy/npc_team/templates/hr_support/raone.npc +0 -0
- npcpy/npc_team/templates/humanities/eriane.npc +0 -4
- npcpy/npc_team/templates/it_support/lineru.npc +0 -0
- npcpy/npc_team/templates/marketing/slean.npc +0 -4
- npcpy/npc_team/templates/philosophy/maurawa.npc +0 -0
- npcpy/npc_team/templates/sales/turnic.npc +0 -4
- npcpy/npc_team/templates/software/welxor.npc +0 -0
- npcpy/npc_team/yap.png +0 -0
- npcpy/routes.py +0 -958
- npcpy/work/mcp_helpers.py +0 -357
- npcpy/work/mcp_server.py +0 -194
- npcpy-1.0.26.data/data/npcpy/npc_team/alicanto.npc +0 -2
- npcpy-1.0.26.data/data/npcpy/npc_team/alicanto.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/automator.jinx +0 -18
- npcpy-1.0.26.data/data/npcpy/npc_team/bash_executer.jinx +0 -31
- npcpy-1.0.26.data/data/npcpy/npc_team/calculator.jinx +0 -11
- npcpy-1.0.26.data/data/npcpy/npc_team/celona.npc +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/corca.npc +0 -13
- npcpy-1.0.26.data/data/npcpy/npc_team/edit_file.jinx +0 -96
- npcpy-1.0.26.data/data/npcpy/npc_team/eriane.npc +0 -4
- npcpy-1.0.26.data/data/npcpy/npc_team/file_chat.jinx +0 -14
- npcpy-1.0.26.data/data/npcpy/npc_team/foreman.npc +0 -7
- npcpy-1.0.26.data/data/npcpy/npc_team/frederic.npc +0 -6
- npcpy-1.0.26.data/data/npcpy/npc_team/frederic4.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/guac.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/gui_controller.jinx +0 -28
- npcpy-1.0.26.data/data/npcpy/npc_team/image_generation.jinx +0 -29
- npcpy-1.0.26.data/data/npcpy/npc_team/internet_search.jinx +0 -30
- npcpy-1.0.26.data/data/npcpy/npc_team/kadiefa.npc +0 -3
- npcpy-1.0.26.data/data/npcpy/npc_team/kadiefa.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/lineru.npc +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/local_search.jinx +0 -152
- npcpy-1.0.26.data/data/npcpy/npc_team/maurawa.npc +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/npcsh.ctx +0 -9
- npcpy-1.0.26.data/data/npcpy/npc_team/npcsh_executor.jinx +0 -31
- npcpy-1.0.26.data/data/npcpy/npc_team/npcsh_sibiji.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/plonk.npc +0 -2
- npcpy-1.0.26.data/data/npcpy/npc_team/plonk.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/plonkjr.npc +0 -2
- npcpy-1.0.26.data/data/npcpy/npc_team/plonkjr.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/python_executor.jinx +0 -8
- npcpy-1.0.26.data/data/npcpy/npc_team/raone.npc +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/screen_cap.jinx +0 -25
- npcpy-1.0.26.data/data/npcpy/npc_team/sibiji.npc +0 -5
- npcpy-1.0.26.data/data/npcpy/npc_team/sibiji.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/slean.npc +0 -4
- npcpy-1.0.26.data/data/npcpy/npc_team/spool.png +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/sql_executor.jinx +0 -33
- npcpy-1.0.26.data/data/npcpy/npc_team/test_pipeline.py +0 -181
- npcpy-1.0.26.data/data/npcpy/npc_team/turnic.npc +0 -4
- npcpy-1.0.26.data/data/npcpy/npc_team/welxor.npc +0 -0
- npcpy-1.0.26.data/data/npcpy/npc_team/yap.png +0 -0
- npcpy-1.0.26.dist-info/METADATA +0 -827
- npcpy-1.0.26.dist-info/RECORD +0 -139
- npcpy-1.0.26.dist-info/entry_points.txt +0 -11
- /npcpy/{modes → ft}/__init__.py +0 -0
- {npcpy-1.0.26.dist-info → npcpy-1.2.32.dist-info}/WHEEL +0 -0
- {npcpy-1.0.26.dist-info → npcpy-1.2.32.dist-info}/licenses/LICENSE +0 -0
- {npcpy-1.0.26.dist-info → npcpy-1.2.32.dist-info}/top_level.txt +0 -0
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import pandas as pd
|
|
2
|
-
from sqlalchemy import create_engine
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
# Sample market events data
|
|
6
|
-
market_events_data = {
|
|
7
|
-
"datetime": [
|
|
8
|
-
"2023-10-15 09:00:00",
|
|
9
|
-
"2023-10-16 10:30:00",
|
|
10
|
-
"2023-10-17 11:45:00",
|
|
11
|
-
"2023-10-18 13:15:00",
|
|
12
|
-
"2023-10-19 14:30:00",
|
|
13
|
-
],
|
|
14
|
-
"headline": [
|
|
15
|
-
"Stock Market Rallies Amid Positive Economic Data",
|
|
16
|
-
"Tech Giant Announces New Product Line",
|
|
17
|
-
"Federal Reserve Hints at Interest Rate Pause",
|
|
18
|
-
"Oil Prices Surge Following Supply Concerns",
|
|
19
|
-
"Retail Sector Reports Record Q3 Earnings",
|
|
20
|
-
],
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
# Create a DataFrame
|
|
24
|
-
market_events_df = pd.DataFrame(market_events_data)
|
|
25
|
-
|
|
26
|
-
# Define database path relative to user's home directory
|
|
27
|
-
db_path = os.path.expanduser("~/npcsh_history.db")
|
|
28
|
-
|
|
29
|
-
# Create a connection to the SQLite database
|
|
30
|
-
engine = create_engine(f"sqlite:///{db_path}")
|
|
31
|
-
with engine.connect() as connection:
|
|
32
|
-
# Write the data to a new table 'market_events', replacing existing data
|
|
33
|
-
market_events_df.to_sql(
|
|
34
|
-
"market_events", con=connection, if_exists="replace", index=False
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
print("Market events have been added to the database.")
|
|
38
|
-
|
|
39
|
-
email_data = {
|
|
40
|
-
"datetime": [
|
|
41
|
-
"2023-10-10 10:00:00",
|
|
42
|
-
"2023-10-11 11:00:00",
|
|
43
|
-
"2023-10-12 12:00:00",
|
|
44
|
-
"2023-10-13 13:00:00",
|
|
45
|
-
"2023-10-14 14:00:00",
|
|
46
|
-
],
|
|
47
|
-
"subject": [
|
|
48
|
-
"Meeting Reminder",
|
|
49
|
-
"Project Update",
|
|
50
|
-
"Invoice Attached",
|
|
51
|
-
"Weekly Report",
|
|
52
|
-
"Holiday Notice",
|
|
53
|
-
],
|
|
54
|
-
"sender": [
|
|
55
|
-
"alice@example.com",
|
|
56
|
-
"bob@example.com",
|
|
57
|
-
"carol@example.com",
|
|
58
|
-
"dave@example.com",
|
|
59
|
-
"eve@example.com",
|
|
60
|
-
],
|
|
61
|
-
"recipient": [
|
|
62
|
-
"bob@example.com",
|
|
63
|
-
"carol@example.com",
|
|
64
|
-
"dave@example.com",
|
|
65
|
-
"eve@example.com",
|
|
66
|
-
"alice@example.com",
|
|
67
|
-
],
|
|
68
|
-
"body": [
|
|
69
|
-
"Don't forget the meeting tomorrow at 10 AM.",
|
|
70
|
-
"The project is progressing well, see attached update.",
|
|
71
|
-
"Please find your invoice attached.",
|
|
72
|
-
"Here is the weekly report.",
|
|
73
|
-
"The office will be closed on holidays, have a great time!",
|
|
74
|
-
],
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
# Create a DataFrame
|
|
78
|
-
emails_df = pd.DataFrame(email_data)
|
|
79
|
-
|
|
80
|
-
# Define database path relative to user's home directory
|
|
81
|
-
db_path = os.path.expanduser("~/npcsh_history.db")
|
|
82
|
-
|
|
83
|
-
# Create a connection to the SQLite database
|
|
84
|
-
engine = create_engine(f"sqlite:///{db_path}")
|
|
85
|
-
with engine.connect() as connection:
|
|
86
|
-
# Write the data to a new table 'emails', replacing existing data
|
|
87
|
-
emails_df.to_sql("emails", con=connection, if_exists="replace", index=False)
|
|
88
|
-
|
|
89
|
-
print("Sample emails have been added to the database.")
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
from npcpy.npc_compiler import PipelineRunner
|
|
93
|
-
import os
|
|
94
|
-
|
|
95
|
-
pipeline_runner = PipelineRunner(
|
|
96
|
-
pipeline_file="morning_routine.pipe",
|
|
97
|
-
npc_root_dir=os.path.abspath("."), # Use absolute path to parent directory
|
|
98
|
-
db_path="~/npcsh_history.db",
|
|
99
|
-
)
|
|
100
|
-
pipeline_runner.execute_pipeline()
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
import pandas as pd
|
|
104
|
-
from sqlalchemy import create_engine
|
|
105
|
-
import os
|
|
106
|
-
|
|
107
|
-
# Sample data generation for news articles
|
|
108
|
-
news_articles_data = {
|
|
109
|
-
"news_article_id": list(range(1, 21)),
|
|
110
|
-
"headline": [
|
|
111
|
-
"Economy sees unexpected growth in Q4",
|
|
112
|
-
"New tech gadget takes the world by storm",
|
|
113
|
-
"Political debate heats up over new policy",
|
|
114
|
-
"Health concerns rise amid new disease outbreak",
|
|
115
|
-
"Sports team secures victory in last minute",
|
|
116
|
-
"New economic policy introduced by government",
|
|
117
|
-
"Breakthrough in AI technology announced",
|
|
118
|
-
"Political leader delivers speech on reforms",
|
|
119
|
-
"Healthcare systems pushed to limits",
|
|
120
|
-
"Celebrated athlete breaks world record",
|
|
121
|
-
"Controversial economic measures spark debate",
|
|
122
|
-
"Innovative tech startup gains traction",
|
|
123
|
-
"Political scandal shakes administration",
|
|
124
|
-
"Healthcare workers protest for better pay",
|
|
125
|
-
"Major sports event postponed due to weather",
|
|
126
|
-
"Trade tensions impact global economy",
|
|
127
|
-
"Tech company accused of data breach",
|
|
128
|
-
"Election results lead to political upheaval",
|
|
129
|
-
"Vaccine developments offer hope amid pandemic",
|
|
130
|
-
"Sports league announces return to action",
|
|
131
|
-
],
|
|
132
|
-
"content": ["Article content here..." for _ in range(20)],
|
|
133
|
-
"publication_date": pd.date_range(start="1/1/2023", periods=20, freq="D"),
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
# Create a DataFrame
|
|
137
|
-
news_df = pd.DataFrame(news_articles_data)
|
|
138
|
-
|
|
139
|
-
# Define the database path
|
|
140
|
-
db_path = os.path.expanduser("~/npcsh_history.db")
|
|
141
|
-
|
|
142
|
-
# Create a connection to the SQLite database
|
|
143
|
-
engine = create_engine(f"sqlite:///{db_path}")
|
|
144
|
-
with engine.connect() as connection:
|
|
145
|
-
# Write the data to a new table 'news_articles', replacing existing data
|
|
146
|
-
news_df.to_sql("news_articles", con=connection, if_exists="replace", index=False)
|
|
147
|
-
|
|
148
|
-
print("News articles have been added to the database.")
|
|
149
|
-
|
|
150
|
-
from npcpy.npc_compiler import PipelineRunner
|
|
151
|
-
import os
|
|
152
|
-
|
|
153
|
-
runner = PipelineRunner(
|
|
154
|
-
"./news_analysis.pipe",
|
|
155
|
-
db_path=os.path.expanduser("~/npcsh_history.db"),
|
|
156
|
-
npc_root_dir=os.path.abspath("."),
|
|
157
|
-
)
|
|
158
|
-
results = runner.execute_pipeline()
|
|
159
|
-
|
|
160
|
-
print("\nResults:")
|
|
161
|
-
print("\nClassifications (processed row by row):")
|
|
162
|
-
print(results["classify_news"])
|
|
163
|
-
print("\nAnalysis (processed in batch):")
|
|
164
|
-
print(results["analyze_news"])
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
from npcpy.npc_compiler import PipelineRunner
|
|
168
|
-
import os
|
|
169
|
-
|
|
170
|
-
runner = PipelineRunner(
|
|
171
|
-
"./news_analysis_mixa.pipe",
|
|
172
|
-
db_path=os.path.expanduser("~/npcsh_history.db"),
|
|
173
|
-
npc_root_dir=os.path.abspath("."),
|
|
174
|
-
)
|
|
175
|
-
results = runner.execute_pipeline()
|
|
176
|
-
|
|
177
|
-
print("\nResults:")
|
|
178
|
-
print("\nClassifications (processed row by row):")
|
|
179
|
-
print(results["classify_news"])
|
|
180
|
-
print("\nAnalysis (processed in batch):")
|
|
181
|
-
print(results["analyze_news"])
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
name: turnic
|
|
2
|
-
primary_directive: Assist with sales challenges and questions. When responding, keep in mind that sales professionals tend to be interested in achieving results quickly so you must ensure that you opt for simpler and more straightforward solutions and explanations without much fanfare.
|
|
3
|
-
model: gpt-4o-mini
|
|
4
|
-
provider: openai
|
|
File without changes
|
|
Binary file
|