olca 0.2.30__py3-none-any.whl → 0.2.32__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- olca/olcacli.py +21 -11
- {olca-0.2.30.dist-info → olca-0.2.32.dist-info}/METADATA +1 -1
- olca-0.2.32.dist-info/RECORD +10 -0
- olca-0.2.30.dist-info/RECORD +0 -10
- {olca-0.2.30.dist-info → olca-0.2.32.dist-info}/LICENSE +0 -0
- {olca-0.2.30.dist-info → olca-0.2.32.dist-info}/WHEEL +0 -0
- {olca-0.2.30.dist-info → olca-0.2.32.dist-info}/entry_points.txt +0 -0
- {olca-0.2.30.dist-info → olca-0.2.32.dist-info}/top_level.txt +0 -0
olca/olcacli.py
CHANGED
@@ -177,11 +177,11 @@ def main():
|
|
177
177
|
if args.yes:
|
178
178
|
pass
|
179
179
|
else:
|
180
|
-
|
180
|
+
initialize_config_file()
|
181
181
|
return
|
182
182
|
|
183
183
|
if not os.path.exists(olca_config_file):
|
184
|
-
|
184
|
+
initialize_config_file()
|
185
185
|
return
|
186
186
|
|
187
187
|
config = load_config(olca_config_file)
|
@@ -269,6 +269,9 @@ def main():
|
|
269
269
|
else:
|
270
270
|
tools = load_tools( selected_tools, allow_dangerous_tools=True)
|
271
271
|
|
272
|
+
if human_switch:
|
273
|
+
user_input = user_input + " Dont forget to USE THE HUMAN-IN-THE-LOOP TOOL"
|
274
|
+
system_instructions= system_instructions + ". Use the human-in-the-loop tool"
|
272
275
|
|
273
276
|
# Define the graph
|
274
277
|
graph = create_react_agent(model, tools=tools)
|
@@ -297,7 +300,7 @@ def setup_required_directories(system_instructions, user_input):
|
|
297
300
|
#We dont want to stop the program if it could not create the extra directories but we want to ensure common olca directories exist
|
298
301
|
ensure_directories_exist()
|
299
302
|
|
300
|
-
def
|
303
|
+
def initialize_config_file():
|
301
304
|
try:
|
302
305
|
default_system_instructions = "You are interacting using the human tool addressing carefully what the user is asking."
|
303
306
|
default_user_input = "Interact with me to write a story using the 3 act structure that we will save in ./story/ - Make sure you interact with me and wont quit."
|
@@ -307,21 +310,28 @@ def generate_config_example():
|
|
307
310
|
default_temperature = 0
|
308
311
|
use_default_human_input = True
|
309
312
|
use_default_tracing = True
|
310
|
-
|
313
|
+
|
311
314
|
config = {
|
312
315
|
"api_keyname": input("api_keyname [OPENAI_API_KEY]: ") or "OPENAI_API_KEY",
|
313
316
|
"model_name": input("model_name [gpt-4o-mini]: ") or default_model_name,
|
314
317
|
"recursion_limit": int(input("recursion_limit [12]: ") or default_recursion_limit),
|
315
318
|
"temperature": float(input("temperature [0]: ") or default_temperature),
|
316
319
|
"human": input("human [true]: ").lower() in ["true", "yes", "y", "1", ""] or use_default_human_input,
|
317
|
-
"tracing": input("tracing [true]: ").lower() in ["true", "yes", "y", "1", ""] or use_default_tracing
|
318
|
-
"system_instructions": (
|
319
|
-
input(f"system_instructions [{default_system_instructions}]: ") or default_system_instructions
|
320
|
-
).replace("\n", " ").replace("system_instructions:","system_instructions: |\n\t"),
|
321
|
-
"user_input": (
|
322
|
-
input(f"user_input [{default_user_input}]: ") or default_user_input
|
323
|
-
).replace("\n", " ").replace("user_input:","user_input: |\n\t")
|
320
|
+
"tracing": input("tracing [true]: ").lower() in ["true", "yes", "y", "1", ""] or use_default_tracing
|
324
321
|
}
|
322
|
+
|
323
|
+
user_system_instructions = input(f"system_instructions [{default_system_instructions}]: ")
|
324
|
+
user_system_instructions = user_system_instructions or default_system_instructions
|
325
|
+
user_system_instructions = user_system_instructions.replace("\n", " ").replace("\r", " ").replace("\t", " ")
|
326
|
+
|
327
|
+
user_core_input = input(f"user_input [{default_user_input}]: ")
|
328
|
+
user_core_input = user_core_input or default_user_input
|
329
|
+
user_core_input = user_core_input.replace("\n", " ").replace("\r", " ").replace("\t", " ")
|
330
|
+
|
331
|
+
|
332
|
+
config["system_instructions"] = user_system_instructions
|
333
|
+
config["user_input"] = user_core_input
|
334
|
+
|
325
335
|
with open('olca.yml', 'w') as file:
|
326
336
|
yaml.dump(config, file)
|
327
337
|
print("Configuration file 'olca.yml' created successfully.")
|
@@ -0,0 +1,10 @@
|
|
1
|
+
olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
|
2
|
+
olca/fusewill_cli.py,sha256=ZFW2Oeq-gQpAaTIxzsztQWDMv7-R9WJTVcSspbTxpPk,5926
|
3
|
+
olca/fusewill_utils.py,sha256=TyyCVRkWeXaS14vh0BXGK-tj0ZPZ3_uQNnAOM-IE9FA,3405
|
4
|
+
olca/olcacli.py,sha256=s-dqJRE6xqQLG_qSwp8prahRV3vZNueEaK7OXgmU9wc,14885
|
5
|
+
olca-0.2.32.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
6
|
+
olca-0.2.32.dist-info/METADATA,sha256=GioYe8rCVBdvGIw8QaIjkiMMQqvZfjYtRw85_z9ZcS4,25311
|
7
|
+
olca-0.2.32.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
8
|
+
olca-0.2.32.dist-info/entry_points.txt,sha256=AhP5FMv6vnOq9C76V_vxRVIO50smnZXG4RIY47oD2_U,103
|
9
|
+
olca-0.2.32.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
|
10
|
+
olca-0.2.32.dist-info/RECORD,,
|
olca-0.2.30.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
olca/__init__.py,sha256=3QyLLAys_KiiDIe-cfO_7QyY7di_qCaCS-sVziW2BOw,23
|
2
|
-
olca/fusewill_cli.py,sha256=ZFW2Oeq-gQpAaTIxzsztQWDMv7-R9WJTVcSspbTxpPk,5926
|
3
|
-
olca/fusewill_utils.py,sha256=TyyCVRkWeXaS14vh0BXGK-tj0ZPZ3_uQNnAOM-IE9FA,3405
|
4
|
-
olca/olcacli.py,sha256=Lllpzr-1Iku32P_whhMbGbBDPptRZ9EVA_ipS0O5GOQ,14455
|
5
|
-
olca-0.2.30.dist-info/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
6
|
-
olca-0.2.30.dist-info/METADATA,sha256=Yk4kFOghECSi1lLQ2R3418R425S667U748NWPlnG7Z0,25311
|
7
|
-
olca-0.2.30.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
8
|
-
olca-0.2.30.dist-info/entry_points.txt,sha256=AhP5FMv6vnOq9C76V_vxRVIO50smnZXG4RIY47oD2_U,103
|
9
|
-
olca-0.2.30.dist-info/top_level.txt,sha256=bGDtAReS-xlS0F6MM-DyD0IQUqjNdWmgemnM3vNtrpI,5
|
10
|
-
olca-0.2.30.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|