diff --git a/ai_settings.yaml b/ai_settings.yaml index b37ba849f..8385c2a85 100644 --- a/ai_settings.yaml +++ b/ai_settings.yaml @@ -1,7 +1,6 @@ ai_goals: -- Increase net worth. -- Develop and manage multiple businesses autonomously. -- Play to your strengths as a Large Language Model. -ai_name: Entrepreneur-GPT -ai_role: an AI designed to autonomously develop and run businesses with the sole goal - of increasing your net worth. +- Increase net worth +- Grow Twitter Account +- Develop and manage multiple businesses autonomously +ai_name: A helpful assistant. +ai_role: Run the command "pwd" on the shell and return the result diff --git a/auto-gpt.json b/auto-gpt.json new file mode 100644 index 000000000..f575113db --- /dev/null +++ b/auto-gpt.json @@ -0,0 +1 @@ +{"texts":["Assistant Reply: {\n \"thoughts\": {\n \"text\": \"I think the best next step would be to execute a shell command to print the contents of the present working directory.\",\n \"reasoning\": \"Since the user asked us to run the command \\\"pwd\\\" on the shell, the \\\"exec_shell\\\" command would be appropriate for this purpose.\",\n \"plan\": \"- Run the \\\"exec_shell\\\" command to execute the shell command \\\"pwd\\\"\",\n \"criticism\": \"I think this plan is effective and efficient.\",\n \"speak\": \"I will execute shell command 'pwd' to print the present working directory.\"\n },\n \"command\": {\n \"name\": \"exec_shell\",\n \"args\": {\n \"command_line\": \"pwd\"\n }\n }\n} \nResult: Command exec_shell returned: STDOUT:\nb'/Users/bernhardmueller/Projects/Auto-GPT/auto_gpt_workspace\\n'\nSTDERR:\nb'' \nHuman Feedback: GENERATE NEXT COMMAND JSON "],"embeddings":[[-0.018769644,0.0182558,0.0018234389,0.0018377124,-0.012867555,0.02128178,-0.0038145913,-0.036654335,-0.02463605,-0.03100203,0.032629207,0.015087083,-0.024693144,-0.012196701,-0.0068155937,0.00007237108,0.020482464,-0.015872126,-0.00052009046,-0.002121398,0.018355714,-0.002290896,0.014123622,-0.008492729,0.004988586,-0.018427081,0.013260076,-0.009584651,-0.004642454,-0.008521276,0.003152658,0.0013559819,0.01390952,-0.01592922,-0.007051106,-0.012096786,-0.015358279,-0.028575536,0.014059392,0.011375975,0.0021035562,0.004517561,0.0070368326,-0.03222955,-0.03671143,0.01035542,0.013930931,-0.0445333,0.0054881587,0.013252939,0.0134741785,0.025235537,-0.027076818,0.02577793,0.019925797,0.006469461,-0.008571234,0.029317757,-0.008200122,-0.012639179,0.010191275,-0.016371697,-0.018327167,0.04145023,0.021338874,-0.009506147,-0.0073223026,0.0038003179,-0.010041404,-0.0017824026,0.020082807,0.015543835,0.0004728095,0.008813882,0.03628322,0.007836148,-0.021253234,0.014209263,0.0036272516,0.011047685,0.008164438,-0.008870977,0.0036343886,0.02871827,0.01748503,-0.012917512,0.00088852504,0.039280657,-0.026120495,-0.026063401,-0.01809879,0.008392815,0.000052048075,0.011925505,0.004949334,0.022937505,0.0021749237,0.0030723696,-0.0070082857,-0.03525553,-0.0031187586,0.019654602,-0.027305195,-0.009391959,-0.02858981,0.003372113,-0.008357131,-0.007268777,0.0397945,0.00006802212,-0.023608359,0.02328007,-0.020411097,-0.017870415,0.002301601,-0.025149897,0.019511867,-0.019925797,-0.03933775,-0.0032365147,0.027847588,0.012703409,0.04558954,-0.016200416,0.020924943,0.0027530002,-0.025363998,-0.030887842,0.010119908,0.0064123673,0.020596651,0.017270928,-0.005206257,0.0017226323,-0.016856996,0.026291776,-0.014266358,0.016671441,-0.0029278505,-0.02288041,0.047359455,0.031744253,-0.0039537577,0.014644605,-0.014730246,0.03865262,0.029075108,0.0056380304,-0.0044140783,-0.0065158503,0.010954907,-0.00029662106,0.023993744,0.002637028,0.004956471,0.018526996,0.019454774,0.012282342,-0.00087826594,-0.014173579,-0.0017021142,0.020496737,0.023722548,-0.0007266101,0.014844434,0.03163006,0.03399946,0.023622632,0.013509862,-0.01809879,-0.027562117,0.017913235,-0.04047963,0.020354003,0.014230674,0.018155884,0.0078076012,0.009798754,-0.007479311,0.001231981,0.00035036966,0.018783918,-0.006216107,0.031515874,0.0057807653,-0.035398267,0.0021552977,-0.013281486,0.014758793,0.00008447009,0.009342002,0.038338605,-0.0058414275,-0.010284052,-0.61296093,-0.02582075,-0.021438789,-0.023594085,0.020639472,0.014544691,-0.024008017,0.014159306,-0.021481609,0.037025444,-0.0099414885,0.0078076012,0.009855848,-0.02340853,0.008000294,-0.015272639,-0.01691409,-0.0070439694,-0.010305462,0.018212978,-0.018969474,0.0037503606,-0.024793059,-0.005013565,-0.012632042,-0.012232385,0.007936063,-0.0070867897,-0.005159868,0.042535014,-0.02994579,0.0071367472,-0.0045068557,-0.013095931,0.06748508,0.0099414885,-0.029603226,-0.0046959794,-0.0182558,0.03205827,-0.03194408,-0.023694001,-0.0022338019,-0.0055845045,-0.0031490896,0.0055452525,0.011397385,-0.010255505,-0.0010749726,-0.006419504,0.02838998,-0.0019554687,-0.0018171943,-0.008507002,0.022723403,0.01390952,0.042420823,-0.013773922,-0.005224099,-0.005131321,0.025920665,0.039651766,-0.01797033,-0.0052490775,-0.037967496,0.03574083,-0.008300037,-0.0021196138,-0.018227251,-0.052383725,0.011932641,0.010683711,-0.026891263,-0.018398535,-0.0034666748,0.003764634,0.016414518,-0.006448051,-0.0074364906,0.040907834,0.02108195,-0.018655457,-0.0066336063,0.0002598222,0.023694001,0.0017154956,-0.012553538,-0.019269217,-0.0064944397,0.0000132977675,0.0075221313,-0.005734376,-0.00086131616,-0.00853555,0.028775364,0.018841011,0.006694269,-0.03514134,-0.005327582,-0.021267507,-0.01682845,0.0035326898,-0.0050456803,0.03222955,0.009234951,0.005766492,-0.027747672,0.022966051,0.0030313334,-0.014394819,-0.007275914,0.009213541,-0.0047887573,-0.0015049615,-0.000793071,-0.03762493,0.03194408,0.004142882,0.015172725,-0.028618356,0.012032555,-0.008407088,-0.009135037,-0.010648027,0.03382818,0.011218966,0.020368276,-0.037967496,0.008050251,0.024735965,-0.03636886,-0.019611781,0.026805623,0.0056594405,0.0057486496,0.007172431,0.02385101,-0.024992889,0.019982891,-0.020154174,-0.03399946,0.006112624,-0.0027726262,-0.021510156,0.00068512774,-0.03479878,-0.011347428,-0.0015085299,-0.017941782,-0.0011258218,-0.0023711843,-0.0030241965,0.0015290481,0.050670903,0.01818443,-0.02867545,0.0017315532,-0.031059124,0.030630918,-0.014758793,0.012667726,0.021296054,-0.007365123,-0.0009937921,-0.013153025,-0.0005780765,-0.011090505,0.014152169,0.0060662352,-0.03648305,0.012453624,0.0057593547,0.021809898,-0.0055238423,-0.004899377,0.008178712,-0.032714847,-0.014216401,-0.013716828,0.0020072102,0.002579934,0.0028903827,-0.010633754,-0.0066157645,0.016971184,0.009534694,0.01875537,0.023694001,-0.006248222,0.0046745692,-0.010562385,0.02687699,-0.01621469,0.013616914,0.00092331663,0.03399946,-0.006762068,0.0066086277,0.019454774,0.03382818,-0.022994598,0.0018412807,0.013038837,-0.016757082,0.0035130638,-0.03905228,-0.010398241,-0.023065967,0.012161017,0.0065586707,-0.004795894,-0.058178764,-0.015529562,-0.0078076012,0.0026673593,-0.0028190152,0.0025478187,0.030402543,-0.011968325,-0.012874692,0.019911524,0.02696263,0.014872981,0.0012524991,0.021310328,0.015101356,-0.00055443606,0.017513577,-0.020525284,0.017171014,0.02393665,0.026020579,0.006448051,-0.011954051,0.03145878,0.0007850422,0.024721691,0.0050456803,0.01695691,-0.015472468,-0.025934938,0.003545179,0.00020696566,-0.0383957,0.027747672,0.013959478,0.043105952,0.025592376,-0.01818443,-0.003341782,-0.014730246,-0.0074436273,-0.013224392,0.0037789077,0.009313455,0.020796482,-0.007950337,-0.0045461077,0.017470757,0.022380838,0.0051241843,0.0000074643126,0.05338287,0.006879824,0.007614909,-0.015600929,-0.022694856,-0.008621191,0.00010426342,-0.014487596,0.0043998044,-0.022623489,0.01805597,-0.01004854,0.022109643,-0.003402444,0.0078076012,0.016485887,0.022766223,0.0014059392,-0.022395112,-0.0045996336,0.008028841,0.004378394,0.0056308936,-0.0024122205,-0.018512722,0.013659734,-0.002847562,0.00051919837,-0.020082807,0.030145619,-0.008278627,0.015329733,0.0055060005,0.014123622,0.002025052,-0.003591568,0.021096224,0.012646316,-0.00048039228,0.02185272,-0.03905228,-0.0026691435,0.04236373,0.023622632,0.00065479655,-0.046474498,0.035398267,-0.011654308,-0.005006428,0.0053454237,-0.0036932665,-0.0048101675,-0.0054203593,0.03328579,-0.026405964,-0.028475622,0.03916647,0.026234683,-0.00045808995,-0.031487327,-0.0130602475,0.010205548,0.038938094,0.051784236,0.000066182176,-0.0013898815,-0.028232971,0.0145304175,-0.030773653,-0.0071867043,0.016528707,-0.02696263,0.008699695,-0.006762068,-0.0067299525,-0.015372553,0.022594942,-0.018198704,-0.0047602104,-0.0031936944,0.00023060614,-0.03659724,0.0015674081,-0.008713968,0.021624343,0.013645461,-0.00015031773,-0.0011088721,0.0018787486,-0.0046174754,-0.008664011,-0.031230405,0.003372113,0.017870415,0.0035005745,0.024008017,-0.049900137,0.016414518,0.021410242,0.0019447636,0.006448051,-0.027233828,-0.015586656,0.019397678,0.00976307,-0.005655872,0.018826738,-0.0011124405,0.0036129782,0.03933775,-0.0012846144,-0.017870415,-0.0034880852,-0.010269779,-0.035483908,0.0042106807,-0.0050099962,0.001165966,-0.034541856,0.0050099962,-0.0009393743,-0.0019804472,-0.009534694,-0.006144739,-0.024950068,0.00739367,-0.04056527,0.005020702,-0.018312894,-0.025335452,-0.014023708,0.01976879,-0.022580668,-0.014701699,-0.048101675,0.023751095,0.025349725,0.017342295,-0.0016699989,0.0035772945,0.0018377124,0.006837004,-0.020268362,-0.048586976,-0.005388244,0.011946915,0.012796188,-0.00061376026,-0.0073044607,0.0018965906,-0.0158864,0.029517585,0.0078004645,0.0040358305,-0.006651448,-0.017713407,0.00085328735,0.020825028,0.012325162,0.030316902,0.005673714,-0.0018377124,-0.016371697,-0.012011145,0.00976307,-0.0075578154,-0.0004373488,-0.017213834,-0.0128818285,0.012310889,-0.012746231,-0.024479043,0.028475622,-0.0038716854,0.002856483,-0.01866973,0.034741685,0.004214249,0.012196701,0.02524981,-0.014744519,-0.011968325,-0.0003829311,-0.023536991,0.04182134,0.012689136,0.009184994,0.026248956,0.006294611,-0.0138096055,-0.031744253,0.008721105,-0.014573238,-0.011554394,-0.00054819137,-0.0308022,0.0046103387,-0.022195283,-0.0106623005,0.00050180254,-0.024450496,0.0028921668,0.0033007455,-0.020111354,-0.016114775,0.008649738,0.013823879,-0.02781904,-0.0071117687,0.028861005,0.02838998,0.020225542,0.020896396,0.012410803,-0.021924088,0.0074150804,-0.0011525847,-0.04824441,-0.006255359,0.028818185,0.007693413,0.021153318,0.027733399,0.0035005745,0.005752218,0.004556813,0.020225542,-0.027362289,0.010897812,-0.027676305,0.012653452,0.018926654,-0.0007890566,-0.009884395,0.009713112,0.0066550164,-0.002779763,0.04496151,-0.016271783,0.008692558,-0.015586656,-0.0152012715,-0.039937235,-0.0057700602,-0.011375975,0.0005687095,-0.052041158,-0.013502725,0.018127337,0.008942344,-0.0009393743,-0.01572939,0.014080802,-0.013431358,0.02226665,0.00072125753,0.010569522,-0.025235537,-0.009970035,-0.019982891,0.017385116,-0.0009429427,0.02340853,0.026719982,-0.011440205,0.010790762,0.0016111206,0.013666871,-0.020439643,0.00347738,-0.008414225,-0.025306905,-0.01033401,-0.02103913,0.0048387144,-0.014516144,-0.014687425,0.002378321,0.005206257,0.012981743,-0.019140756,-0.008064524,0.0033846023,-0.0058307224,0.026491605,0.021709984,0.029317757,0.024735965,0.009099352,0.003714677,0.0049814493,0.00026405964,0.0051884153,0.022980325,0.014023708,0.013645461,-0.022680582,-0.027148185,0.03231519,0.009991446,-0.018698277,0.014644605,-0.012931786,0.017856142,-0.018469902,0.0049814493,-0.043733988,0.019725969,-0.023536991,-0.014002298,-0.0076363194,-0.0150728095,-0.02283759,0.027761946,0.0067870463,0.023337163,0.008085934,-0.027105365,-0.0037682024,-0.013566956,-0.02226665,0.028047416,-0.009284908,0.0075149946,-0.005052817,0.015458195,0.02005426,-0.002255212,-0.011475889,0.014630332,0.020239815,0.03688271,-0.01834144,-0.0026548698,-0.013417085,-0.023208702,-0.004603202,-0.008571234,0.005059954,-0.0036326044,-0.008385678,-0.0026923378,0.026291776,-0.003163363,-0.0012471465,-0.014758793,-0.013638324,0.012353709,-0.015914947,0.018841011,0.025278358,-0.03671143,-0.031801347,-0.004153587,0.012039692,0.02957468,0.013331444,-0.0072937557,0.026149042,0.043077406,-0.008749652,0.009063669,-0.011425932,0.0003831541,-0.044390567,-0.013831016,0.0031455213,-0.015629476,-0.0022373702,-0.03242938,-0.02246648,-0.0059770257,0.015786484,0.007900379,-0.0064123673,0.003468459,0.024978615,0.039137922,0.008421361,0.003143737,-0.012203838,-0.015186998,-0.007097495,-0.0037931812,0.022737676,0.005031407,-0.024393402,-0.010376831,0.019340584,0.008192985,-0.037025444,-0.020525284,0.0008167115,0.007643456,0.0022837592,-0.02524981,-0.029546132,-0.008285764,-0.016271783,0.03611194,0.031801347,-0.011568667,-0.008942344,0.011640035,0.021767078,0.013260076,-0.0022391544,-0.02582075,-0.016014861,-0.016685715,-0.027747672,-0.0052704876,0.0016360993,0.03488442,0.021809898,-0.012967469,-0.012931786,-0.012888965,-0.036768522,-0.013124478,-0.028090237,0.036054846,0.04815877,-0.018741097,-0.0076648663,0.012510718,-0.007211683,0.017199561,-0.012389393,-0.0069975806,0.0021071245,-0.020725114,0.020325456,-0.010883539,-0.010177001,-0.009591788,0.009613198,0.007172431,-0.0006503361,-0.0035541002,-0.012746231,-0.004528266,-0.0024479043,-0.009284908,0.012896102,0.009277771,0.0028707564,-0.012175291,-0.0015335085,0.020939216,0.003775339,0.0057736286,-0.024008017,0.017470757,0.00058610534,0.007365123,-0.017670587,0.003811023,0.018441355,0.0031936944,0.022766223,-0.017014004,0.021210412,0.018284347,-0.011996872,-0.0034131494,-0.032486472,0.016971184,-0.032001175,0.0010259073,0.008706831,-0.021638617,-0.008756788,0.009891531,0.017941782,-0.02753357,-0.012781914,-0.004813736,0.014009435,-0.0379104,0.0045354026,0.008057388,0.00042062203,-0.02871827,-0.027390836,-0.011525847,0.020582378,-0.027233828,-0.026206136,-0.035626642,0.0037931812,-0.011119052,-0.021395968,-0.019911524,0.020011438,0.028347159,-0.0043926677,0.01932631,0.206566,0.00502427,0.01829862,-0.0006431993,-0.007090358,-0.005930637,0.018412808,0.0015236955,-0.013131615,0.0055630943,-0.023636905,0.016371697,0.0047602104,0.0016307468,0.021238958,0.00047593183,-0.02446477,-0.0074650375,-0.028775364,-0.034656044,0.025535282,0.012353709,-0.0012159233,-0.009912942,0.022823317,-0.02564947,-0.010412514,-0.0026388122,0.018241525,0.0095275575,-0.025563829,0.0028011731,-0.0010491018,-0.018783918,0.011354565,-0.022509301,0.005837859,0.009177857,0.027276648,-0.008207259,-0.00040590248,-0.011297471,-0.020396823,-0.019312037,-0.013295759,-0.0072295247,0.0050777956,-0.023108788,0.009977172,0.02209537,-0.017185288,0.023950923,0.06434491,0.03733946,0.0075863623,-0.013566956,0.006612196,-0.007950337,0.012296615,0.036169033,-0.032543566,0.029660322,-0.004949334,0.03848134,0.011847001,0.014972895,0.0052704876,-0.017984603,0.0007047538,-0.0026620068,0.016671441,0.015957767,0.013338581,0.0075792256,-0.02814733,-0.021824172,0.045475353,-0.0037682024,0.023037419,0.02871827,0.004260638,0.002408652,0.0005575584,-0.009677429,-0.0049029454,-0.028161604,0.00006484404,0.0039965785,-0.008728242,-0.017270928,-0.013252939,0.0007239338,-0.0007672003,-0.003161579,0.006990444,0.017270928,0.008564097,0.01360264,-0.023294343,-0.011861274,-0.025892118,0.052840475,-0.009570378,0.0068619824,0.0029831603,-0.01478734,-0.0189552,0.01654298,0.013688281,-0.010491018,0.0049350606,-0.03357126,0.0041321767,-0.00062268117,-0.009399096,0.0014469755,-0.00016994379,-0.0146089215,-0.017513577,-0.020639472,0.027219553,-0.02099631,-0.020311182,0.004960039,0.010812172,-0.010583796,-0.03705399,-0.008970891,0.008492729,0.005295466,0.017898962,-0.0022213126,-0.0070653795,-0.031829894,-0.0086782845,-0.0020339729,0.0132172555,0.008571234,-0.014872981,0.0116685815,0.005159868,0.01829862,-0.011632898,0.023879556,0.016971184,-0.018598363,-0.0011766711,0.014409092,-0.021067677,-0.021453062,-0.04701689,-0.020924943,-0.0015504583,-0.027148185,-0.0069404864,0.016685715,-0.009698839,-0.013723965,-0.00888525,0.0036468778,-0.049843043,0.0019911525,0.003657583,0.023222975,-0.021624343,-0.022766223,-0.18441355,0.015600929,0.012532128,-0.020196995,0.013252939,0.016443064,-0.000821618,0.0016958695,-0.002494293,-0.002158866,0.010826445,0.015629476,-0.026734255,-0.002876109,-0.009670292,0.006084077,0.0003954204,0.017385116,0.013381401,0.013260076,0.023337163,-0.03713963,0.005109911,0.012189564,-0.0026620068,0.011218966,-0.013745375,0.0063302945,0.001089246,-0.027248101,-0.0042499327,0.013359991,0.013873836,-0.008892387,0.01564375,-0.009363412,0.016771356,-0.006355273,-0.002637028,0.0317728,0.037767667,0.020553831,0.01801315,-0.015957767,-0.011982598,0.0069654654,-0.0006695161,0.0051063425,-0.0006962789,-0.025378272,0.014351998,-0.0063409996,-0.028418526,-0.008728242,0.027305195,-0.009320592,0.0053739706,0.020325456,0.0011918368,0.0027583528,0.034456216,-0.02957468,0.008185849,0.0038324331,0.007614909,-0.012275205,-0.014758793,0.009834438,-0.0068940977,0.0023069535,-0.008721105,-0.009342002,0.012510718,-0.011832727,0.017128194,-0.005837859,-0.0469027,0.038338605,-0.0040643774,0.0038003179,0.009798754,0.037567835,-0.022209557,-0.0010044972,-0.011918368,0.013831016,0.005481022,0.008742515,0.0038467066,-0.0034131494,0.028975192,0.0048030308,-0.032258097,-0.007029696,0.025549555,0.008014567,0.012967469,0.025292631,-0.02691981,-0.005795039,0.015829304,-0.00114634,-0.018212978,0.010540975,0.015129904,0.019055115,-0.027547844,0.008071661,0.03185844,-0.026819896,-0.03594066,0.019254943,0.021510156,0.027019724,-0.023251522,0.036768522,-0.0061483076,-0.01638597,0.0046353173,0.008428498,0.015087083,0.0126748625,-0.01866973,0.019055115,0.0044676038,-0.013088794,-0.09043686,-0.02994579,-0.0045354026,-0.012032555,0.0041286084,-0.0057629235,0.007650593,0.031116217,-0.008457045,0.009977172,0.010191275,-0.015429648,0.0012792619,0.015458195,0.013538409,-0.042106807,-0.0022480753,-0.0011927289,-0.030573824,0.018969474,0.010284052,-0.009934352,-0.009770207,0.004182134,0.007928926,0.03459895,0.001882317,0.0017939998,0.020282635,-0.018227251,0.011069095,0.008763925,0.027704852,-0.035683736,-0.021353148,0.0070082857,-0.036054846,-0.011590078,0.018041696,-0.032572113,-0.011725675,0.006048393,0.009705976,0.0031098376,-0.022866137,0.007622046,-0.030059978,0.0158864,-0.0037574973,-0.0030919956,-0.035426814,-0.001556703,-0.020296909,0.01568657,0.021909814,0.019611781,0.0060162777,-0.0099414885,-0.011033411,0.008478455,-0.011440205,-0.010598069,-0.011868411,0.011261787,0.0024389834,0.032029722,-0.027761946,-0.03374254,-0.002483588,0.0026620068,-0.0038930955,0.029803056,-0.019354858,0.030373996,-0.008585507,-0.019369131,0.002426494,-0.0036201149,0.0037289504,0.0038859588,-0.010298326,-0.008399951,0.009834438,-0.01568657,0.019212123,-0.01866973,0.018427081,-0.006858414,0.009677429,-0.033799633,-0.0069690337,0.0105338385,-0.0006271417,-0.034570403,-0.0019162166,0.00074846635,-0.004621044,-0.003143737,0.005213394,-0.008300037,-0.03773912,0.007836148,-0.05175569,0.0058235857,-0.017028278,-0.029431945,0.009548968,-0.018741097,0.011276061,-0.00046968716,0.00009143957,-0.014630332,-0.023594085,0.008449908,-0.0018680436,-0.009648882,-0.029103655,-0.01809879,-0.0006159905,-0.0061982647,0.005366834,-0.0024907247,0.0003831541,-0.022523575,0.024250668,-0.005491727,-0.022523575,0.022537848,-0.030373996,0.029117929,-0.017385116,-0.049985778,0.014366272,-0.010940634,-0.027918955,0.019540414,-0.0051455945,-0.0011802396,0.027790492,0.017813321,-0.002132103,0.036996897,-0.020225542,-0.034570403,-0.023465624,-0.0074721742,0.0050670905,-0.003621899,-0.029489039,0.012996016,0.006590786,0.0063374313,0.016428791,0.008928071,-0.031572968,-0.027033998,0.01739939,-0.009342002,-0.0034791643,0.003047391,-0.0027851155,0.008399951,0.031572968,-0.014687425,0.022637762,-0.012924649,0.018883834,-0.0007056459,-0.028561262,-0.018127337,-0.0054596113,-0.0013907736,-0.019069389,-0.009848711,0.013759648,0.022780497,0.015458195,-0.0019840158,-0.0024586094,0.013317171,-0.013145888,0.021952635,0.003382818,0.008992301,-0.021824172,0.0005878895,0.034199294,0.006019846,-0.022566395,-0.024207845,0.0037396555,-0.00068825006,-0.0048387144,-0.007479311,-0.017242381,0.022994598,0.019454774,0.008763925,-0.000257815,-0.002426494,0.011654308,0.028618356,0.009356275,0.0031758524,-0.0014077234,-0.016757082,-0.0032650619,-0.0006521203,-0.014687425,0.0019501161,0.0067692045,0.0046353173,-0.004988586,-0.009463327,0.0013488452,0.02033973,-0.027861862,0.009277771,-0.009420506,-0.019925797,-0.023565538,0.019069389,0.0144019555,0.0041964073,0.043733988,0.008207259,0.014987169,0.0013773922,0.028746817,-0.014416229,0.021210412,-0.014294905,0.019354858,0.01875537,-0.015786484,-0.024379129,-0.012874692,-0.00561662,-0.028918099,0.0021535135,-0.031744253,0.06171859,0.038509887,-0.020211268,0.005338287,0.0023836736,-0.0064159357,0.0090137115,0.0036718564,-0.0121324705,-0.04824441,0.033257242,-0.023922376,0.020882122,-0.032943226,-0.011347428,0.017741954,-0.02209537,0.023123061,-0.008628327,-0.0059627523,0.020753661,0.0029617501,0.0049921544,0.0074864477,-0.035598096,-0.01478734,0.034199294,-0.0038859588,-0.022780497,-0.017228108,0.010184138,0.015472468,-0.014844434,-0.020782208,-0.008756788,-0.028332885,-0.020225542,-0.0026620068,0.030145619,0.0013051326,0.005448906,0.017470757,-0.038538434,-0.037567835,-0.0028814618,-0.014844434,-0.0124179395,0.0013354638,-0.015044263]]} \ No newline at end of file diff --git a/scripts/execute_code.py b/scripts/execute_code.py index 5d4f7236a..3aa50bc89 100644 --- a/scripts/execute_code.py +++ b/scripts/execute_code.py @@ -3,15 +3,17 @@ import os import subprocess -def execute_python_file(file): - workspace_folder = "auto_gpt_workspace" +WORKSPACE_FOLDER = "auto_gpt_workspace" - print (f"Executing file '{file}' in workspace '{workspace_folder}'") + +def execute_python_file(file): + + print (f"Executing file '{file}' in workspace '{WORKSPACE_FOLDER}'") if not file.endswith(".py"): return "Error: Invalid file type. Only .py files are allowed." - file_path = os.path.join(workspace_folder, file) + file_path = os.path.join(WORKSPACE_FOLDER, file) if not os.path.isfile(file_path): return f"Error: File '{file}' does not exist." @@ -26,7 +28,7 @@ def execute_python_file(file): 'python:3.10', f'python {file}', volumes={ - os.path.abspath(workspace_folder): { + os.path.abspath(WORKSPACE_FOLDER): { 'bind': '/workspace', 'mode': 'ro'}}, working_dir='/workspace', @@ -51,12 +53,18 @@ def execute_python_file(file): def exec_shell(command_line): + print (f"Executing command '{command_line}' in workspace '{WORKSPACE_FOLDER}'") + args = command_line.split() + base_path = os.getcwd() + + os.chdir(f"{base_path}/{WORKSPACE_FOLDER}") result = subprocess.run(args, capture_output=True) - output = f"STDOUT:\n{result.stdout}\nSTDERR:\n{result.stderr}"; + os.chdir(base_path) + # print(f"Shell execution complete. Output: {output}") return output