diff --git a/Pipfile b/Pipfile index 6241487..1d82aec 100644 --- a/Pipfile +++ b/Pipfile @@ -11,6 +11,7 @@ waitress = "*" flask-limiter = "*" authlib = "*" requests = "*" +openai = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 97f2e27..aad106b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "ae95db72f8d935c51fae1c8c400fb285a31973cc86ce2de1621babfb4a4257bd" + "sha256": "03fe8fa3bbd40c26179ff43a11799207e02005568fed107f3cda6425fad5eb3f" }, "pipfile-spec": 6, "requires": { @@ -16,6 +16,123 @@ ] }, "default": { + "aiohttp": { + "hashes": [ + "sha256:03543dcf98a6619254b409be2d22b51f21ec66272be4ebda7b04e6412e4b2e14", + "sha256:03baa76b730e4e15a45f81dfe29a8d910314143414e528737f8589ec60cf7391", + "sha256:0a63f03189a6fa7c900226e3ef5ba4d3bd047e18f445e69adbd65af433add5a2", + "sha256:10c8cefcff98fd9168cdd86c4da8b84baaa90bf2da2269c6161984e6737bf23e", + "sha256:147ae376f14b55f4f3c2b118b95be50a369b89b38a971e80a17c3fd623f280c9", + "sha256:176a64b24c0935869d5bbc4c96e82f89f643bcdf08ec947701b9dbb3c956b7dd", + "sha256:17b79c2963db82086229012cff93ea55196ed31f6493bb1ccd2c62f1724324e4", + "sha256:1a45865451439eb320784918617ba54b7a377e3501fb70402ab84d38c2cd891b", + "sha256:1b3ea7edd2d24538959c1c1abf97c744d879d4e541d38305f9bd7d9b10c9ec41", + "sha256:22f6eab15b6db242499a16de87939a342f5a950ad0abaf1532038e2ce7d31567", + "sha256:3032dcb1c35bc330134a5b8a5d4f68c1a87252dfc6e1262c65a7e30e62298275", + "sha256:33587f26dcee66efb2fff3c177547bd0449ab7edf1b73a7f5dea1e38609a0c54", + "sha256:34ce9f93a4a68d1272d26030655dd1b58ff727b3ed2a33d80ec433561b03d67a", + "sha256:3a80464982d41b1fbfe3154e440ba4904b71c1a53e9cd584098cd41efdb188ef", + "sha256:3b90467ebc3d9fa5b0f9b6489dfb2c304a1db7b9946fa92aa76a831b9d587e99", + "sha256:3d89efa095ca7d442a6d0cbc755f9e08190ba40069b235c9886a8763b03785da", + "sha256:3d8ef1a630519a26d6760bc695842579cb09e373c5f227a21b67dc3eb16cfea4", + "sha256:3f43255086fe25e36fd5ed8f2ee47477408a73ef00e804cb2b5cba4bf2ac7f5e", + "sha256:40653609b3bf50611356e6b6554e3a331f6879fa7116f3959b20e3528783e699", + "sha256:41a86a69bb63bb2fc3dc9ad5ea9f10f1c9c8e282b471931be0268ddd09430b04", + "sha256:493f5bc2f8307286b7799c6d899d388bbaa7dfa6c4caf4f97ef7521b9cb13719", + "sha256:4a6cadebe132e90cefa77e45f2d2f1a4b2ce5c6b1bfc1656c1ddafcfe4ba8131", + "sha256:4c745b109057e7e5f1848c689ee4fb3a016c8d4d92da52b312f8a509f83aa05e", + "sha256:4d347a172f866cd1d93126d9b239fcbe682acb39b48ee0873c73c933dd23bd0f", + "sha256:4dac314662f4e2aa5009977b652d9b8db7121b46c38f2073bfeed9f4049732cd", + "sha256:4ddaae3f3d32fc2cb4c53fab020b69a05c8ab1f02e0e59665c6f7a0d3a5be54f", + "sha256:5393fb786a9e23e4799fec788e7e735de18052f83682ce2dfcabaf1c00c2c08e", + "sha256:59f029a5f6e2d679296db7bee982bb3d20c088e52a2977e3175faf31d6fb75d1", + "sha256:5a7bdf9e57126dc345b683c3632e8ba317c31d2a41acd5800c10640387d193ed", + "sha256:5b3f2e06a512e94722886c0827bee9807c86a9f698fac6b3aee841fab49bbfb4", + "sha256:5ce45967538fb747370308d3145aa68a074bdecb4f3a300869590f725ced69c1", + "sha256:5e14f25765a578a0a634d5f0cd1e2c3f53964553a00347998dfdf96b8137f777", + "sha256:618c901dd3aad4ace71dfa0f5e82e88b46ef57e3239fc7027773cb6d4ed53531", + "sha256:652b1bff4f15f6287550b4670546a2947f2a4575b6c6dff7760eafb22eacbf0b", + "sha256:6c08e8ed6fa3d477e501ec9db169bfac8140e830aa372d77e4a43084d8dd91ab", + "sha256:6ddb2a2026c3f6a68c3998a6c47ab6795e4127315d2e35a09997da21865757f8", + "sha256:6e601588f2b502c93c30cd5a45bfc665faaf37bbe835b7cfd461753068232074", + "sha256:6e74dd54f7239fcffe07913ff8b964e28b712f09846e20de78676ce2a3dc0bfc", + "sha256:7235604476a76ef249bd64cb8274ed24ccf6995c4a8b51a237005ee7a57e8643", + "sha256:7ab43061a0c81198d88f39aaf90dae9a7744620978f7ef3e3708339b8ed2ef01", + "sha256:7c7837fe8037e96b6dd5cfcf47263c1620a9d332a87ec06a6ca4564e56bd0f36", + "sha256:80575ba9377c5171407a06d0196b2310b679dc752d02a1fcaa2bc20b235dbf24", + "sha256:80a37fe8f7c1e6ce8f2d9c411676e4bc633a8462844e38f46156d07a7d401654", + "sha256:8189c56eb0ddbb95bfadb8f60ea1b22fcfa659396ea36f6adcc521213cd7b44d", + "sha256:854f422ac44af92bfe172d8e73229c270dc09b96535e8a548f99c84f82dde241", + "sha256:880e15bb6dad90549b43f796b391cfffd7af373f4646784795e20d92606b7a51", + "sha256:8b631e26df63e52f7cce0cce6507b7a7f1bc9b0c501fcde69742130b32e8782f", + "sha256:8c29c77cc57e40f84acef9bfb904373a4e89a4e8b74e71aa8075c021ec9078c2", + "sha256:91f6d540163f90bbaef9387e65f18f73ffd7c79f5225ac3d3f61df7b0d01ad15", + "sha256:92c0cea74a2a81c4c76b62ea1cac163ecb20fb3ba3a75c909b9fa71b4ad493cf", + "sha256:9bcb89336efa095ea21b30f9e686763f2be4478f1b0a616969551982c4ee4c3b", + "sha256:a1f4689c9a1462f3df0a1f7e797791cd6b124ddbee2b570d34e7f38ade0e2c71", + "sha256:a3fec6a4cb5551721cdd70473eb009d90935b4063acc5f40905d40ecfea23e05", + "sha256:a5d794d1ae64e7753e405ba58e08fcfa73e3fad93ef9b7e31112ef3c9a0efb52", + "sha256:a86d42d7cba1cec432d47ab13b6637bee393a10f664c425ea7b305d1301ca1a3", + "sha256:adfbc22e87365a6e564c804c58fc44ff7727deea782d175c33602737b7feadb6", + "sha256:aeb29c84bb53a84b1a81c6c09d24cf33bb8432cc5c39979021cc0f98c1292a1a", + "sha256:aede4df4eeb926c8fa70de46c340a1bc2c6079e1c40ccf7b0eae1313ffd33519", + "sha256:b744c33b6f14ca26b7544e8d8aadff6b765a80ad6164fb1a430bbadd593dfb1a", + "sha256:b7a00a9ed8d6e725b55ef98b1b35c88013245f35f68b1b12c5cd4100dddac333", + "sha256:bb96fa6b56bb536c42d6a4a87dfca570ff8e52de2d63cabebfd6fb67049c34b6", + "sha256:bbcf1a76cf6f6dacf2c7f4d2ebd411438c275faa1dc0c68e46eb84eebd05dd7d", + "sha256:bca5f24726e2919de94f047739d0a4fc01372801a3672708260546aa2601bf57", + "sha256:bf2e1a9162c1e441bf805a1fd166e249d574ca04e03b34f97e2928769e91ab5c", + "sha256:c4eb3b82ca349cf6fadcdc7abcc8b3a50ab74a62e9113ab7a8ebc268aad35bb9", + "sha256:c6cc15d58053c76eacac5fa9152d7d84b8d67b3fde92709195cb984cfb3475ea", + "sha256:c6cd05ea06daca6ad6a4ca3ba7fe7dc5b5de063ff4daec6170ec0f9979f6c332", + "sha256:c844fd628851c0bc309f3c801b3a3d58ce430b2ce5b359cd918a5a76d0b20cb5", + "sha256:c9cb1565a7ad52e096a6988e2ee0397f72fe056dadf75d17fa6b5aebaea05622", + "sha256:cab9401de3ea52b4b4c6971db5fb5c999bd4260898af972bf23de1c6b5dd9d71", + "sha256:cd468460eefef601ece4428d3cf4562459157c0f6523db89365202c31b6daebb", + "sha256:d1e6a862b76f34395a985b3cd39a0d949ca80a70b6ebdea37d3ab39ceea6698a", + "sha256:d1f9282c5f2b5e241034a009779e7b2a1aa045f667ff521e7948ea9b56e0c5ff", + "sha256:d265f09a75a79a788237d7f9054f929ced2e69eb0bb79de3798c468d8a90f945", + "sha256:db3fc6120bce9f446d13b1b834ea5b15341ca9ff3f335e4a951a6ead31105480", + "sha256:dbf3a08a06b3f433013c143ebd72c15cac33d2914b8ea4bea7ac2c23578815d6", + "sha256:de04b491d0e5007ee1b63a309956eaed959a49f5bb4e84b26c8f5d49de140fa9", + "sha256:e4b09863aae0dc965c3ef36500d891a3ff495a2ea9ae9171e4519963c12ceefd", + "sha256:e595432ac259af2d4630008bf638873d69346372d38255774c0e286951e8b79f", + "sha256:e75b89ac3bd27d2d043b234aa7b734c38ba1b0e43f07787130a0ecac1e12228a", + "sha256:ea9eb976ffdd79d0e893869cfe179a8f60f152d42cb64622fca418cd9b18dc2a", + "sha256:eafb3e874816ebe2a92f5e155f17260034c8c341dad1df25672fb710627c6949", + "sha256:ee3c36df21b5714d49fc4580247947aa64bcbe2939d1b77b4c8dcb8f6c9faecc", + "sha256:f352b62b45dff37b55ddd7b9c0c8672c4dd2eb9c0f9c11d395075a84e2c40f75", + "sha256:fabb87dd8850ef0f7fe2b366d44b77d7e6fa2ea87861ab3844da99291e81e60f", + "sha256:fe11310ae1e4cd560035598c3f29d86cef39a83d244c7466f95c27ae04850f10", + "sha256:fe7ba4a51f33ab275515f66b0a236bcde4fb5561498fe8f898d4e549b2e4509f" + ], + "markers": "python_version >= '3.6'", + "version": "==3.8.4" + }, + "aiosignal": { + "hashes": [ + "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc", + "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17" + ], + "markers": "python_version >= '3.7'", + "version": "==1.3.1" + }, + "async-timeout": { + "hashes": [ + "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15", + "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c" + ], + "markers": "python_version >= '3.6'", + "version": "==4.0.2" + }, + "attrs": { + "hashes": [ + "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04", + "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015" + ], + "markers": "python_version >= '3.7'", + "version": "==23.1.0" + }, "authlib": { "hashes": [ "sha256:4ddf4fd6cfa75c9a460b361d4bd9dac71ffda0be879dbe4292a02e92349ad55a", @@ -263,6 +380,86 @@ "index": "pypi", "version": "==3.3.1" }, + "frozenlist": { + "hashes": [ + "sha256:008a054b75d77c995ea26629ab3a0c0d7281341f2fa7e1e85fa6153ae29ae99c", + "sha256:02c9ac843e3390826a265e331105efeab489ffaf4dd86384595ee8ce6d35ae7f", + "sha256:034a5c08d36649591be1cbb10e09da9f531034acfe29275fc5454a3b101ce41a", + "sha256:05cdb16d09a0832eedf770cb7bd1fe57d8cf4eaf5aced29c4e41e3f20b30a784", + "sha256:0693c609e9742c66ba4870bcee1ad5ff35462d5ffec18710b4ac89337ff16e27", + "sha256:0771aed7f596c7d73444c847a1c16288937ef988dc04fb9f7be4b2aa91db609d", + "sha256:0af2e7c87d35b38732e810befb9d797a99279cbb85374d42ea61c1e9d23094b3", + "sha256:14143ae966a6229350021384870458e4777d1eae4c28d1a7aa47f24d030e6678", + "sha256:180c00c66bde6146a860cbb81b54ee0df350d2daf13ca85b275123bbf85de18a", + "sha256:1841e200fdafc3d51f974d9d377c079a0694a8f06de2e67b48150328d66d5483", + "sha256:23d16d9f477bb55b6154654e0e74557040575d9d19fe78a161bd33d7d76808e8", + "sha256:2b07ae0c1edaa0a36339ec6cce700f51b14a3fc6545fdd32930d2c83917332cf", + "sha256:2c926450857408e42f0bbc295e84395722ce74bae69a3b2aa2a65fe22cb14b99", + "sha256:2e24900aa13212e75e5b366cb9065e78bbf3893d4baab6052d1aca10d46d944c", + "sha256:303e04d422e9b911a09ad499b0368dc551e8c3cd15293c99160c7f1f07b59a48", + "sha256:352bd4c8c72d508778cf05ab491f6ef36149f4d0cb3c56b1b4302852255d05d5", + "sha256:3843f84a6c465a36559161e6c59dce2f2ac10943040c2fd021cfb70d58c4ad56", + "sha256:394c9c242113bfb4b9aa36e2b80a05ffa163a30691c7b5a29eba82e937895d5e", + "sha256:3bbdf44855ed8f0fbcd102ef05ec3012d6a4fd7c7562403f76ce6a52aeffb2b1", + "sha256:40de71985e9042ca00b7953c4f41eabc3dc514a2d1ff534027f091bc74416401", + "sha256:41fe21dc74ad3a779c3d73a2786bdf622ea81234bdd4faf90b8b03cad0c2c0b4", + "sha256:47df36a9fe24054b950bbc2db630d508cca3aa27ed0566c0baf661225e52c18e", + "sha256:4ea42116ceb6bb16dbb7d526e242cb6747b08b7710d9782aa3d6732bd8d27649", + "sha256:58bcc55721e8a90b88332d6cd441261ebb22342e238296bb330968952fbb3a6a", + "sha256:5c11e43016b9024240212d2a65043b70ed8dfd3b52678a1271972702d990ac6d", + "sha256:5cf820485f1b4c91e0417ea0afd41ce5cf5965011b3c22c400f6d144296ccbc0", + "sha256:5d8860749e813a6f65bad8285a0520607c9500caa23fea6ee407e63debcdbef6", + "sha256:6327eb8e419f7d9c38f333cde41b9ae348bec26d840927332f17e887a8dcb70d", + "sha256:65a5e4d3aa679610ac6e3569e865425b23b372277f89b5ef06cf2cdaf1ebf22b", + "sha256:66080ec69883597e4d026f2f71a231a1ee9887835902dbe6b6467d5a89216cf6", + "sha256:783263a4eaad7c49983fe4b2e7b53fa9770c136c270d2d4bbb6d2192bf4d9caf", + "sha256:7f44e24fa70f6fbc74aeec3e971f60a14dde85da364aa87f15d1be94ae75aeef", + "sha256:7fdfc24dcfce5b48109867c13b4cb15e4660e7bd7661741a391f821f23dfdca7", + "sha256:810860bb4bdce7557bc0febb84bbd88198b9dbc2022d8eebe5b3590b2ad6c842", + "sha256:841ea19b43d438a80b4de62ac6ab21cfe6827bb8a9dc62b896acc88eaf9cecba", + "sha256:84610c1502b2461255b4c9b7d5e9c48052601a8957cd0aea6ec7a7a1e1fb9420", + "sha256:899c5e1928eec13fd6f6d8dc51be23f0d09c5281e40d9cf4273d188d9feeaf9b", + "sha256:8bae29d60768bfa8fb92244b74502b18fae55a80eac13c88eb0b496d4268fd2d", + "sha256:8df3de3a9ab8325f94f646609a66cbeeede263910c5c0de0101079ad541af332", + "sha256:8fa3c6e3305aa1146b59a09b32b2e04074945ffcfb2f0931836d103a2c38f936", + "sha256:924620eef691990dfb56dc4709f280f40baee568c794b5c1885800c3ecc69816", + "sha256:9309869032abb23d196cb4e4db574232abe8b8be1339026f489eeb34a4acfd91", + "sha256:9545a33965d0d377b0bc823dcabf26980e77f1b6a7caa368a365a9497fb09420", + "sha256:9ac5995f2b408017b0be26d4a1d7c61bce106ff3d9e3324374d66b5964325448", + "sha256:9bbbcedd75acdfecf2159663b87f1bb5cfc80e7cd99f7ddd9d66eb98b14a8411", + "sha256:a4ae8135b11652b08a8baf07631d3ebfe65a4c87909dbef5fa0cdde440444ee4", + "sha256:a6394d7dadd3cfe3f4b3b186e54d5d8504d44f2d58dcc89d693698e8b7132b32", + "sha256:a97b4fe50b5890d36300820abd305694cb865ddb7885049587a5678215782a6b", + "sha256:ae4dc05c465a08a866b7a1baf360747078b362e6a6dbeb0c57f234db0ef88ae0", + "sha256:b1c63e8d377d039ac769cd0926558bb7068a1f7abb0f003e3717ee003ad85530", + "sha256:b1e2c1185858d7e10ff045c496bbf90ae752c28b365fef2c09cf0fa309291669", + "sha256:b4395e2f8d83fbe0c627b2b696acce67868793d7d9750e90e39592b3626691b7", + "sha256:b756072364347cb6aa5b60f9bc18e94b2f79632de3b0190253ad770c5df17db1", + "sha256:ba64dc2b3b7b158c6660d49cdb1d872d1d0bf4e42043ad8d5006099479a194e5", + "sha256:bed331fe18f58d844d39ceb398b77d6ac0b010d571cba8267c2e7165806b00ce", + "sha256:c188512b43542b1e91cadc3c6c915a82a5eb95929134faf7fd109f14f9892ce4", + "sha256:c21b9aa40e08e4f63a2f92ff3748e6b6c84d717d033c7b3438dd3123ee18f70e", + "sha256:ca713d4af15bae6e5d79b15c10c8522859a9a89d3b361a50b817c98c2fb402a2", + "sha256:cd4210baef299717db0a600d7a3cac81d46ef0e007f88c9335db79f8979c0d3d", + "sha256:cfe33efc9cb900a4c46f91a5ceba26d6df370ffddd9ca386eb1d4f0ad97b9ea9", + "sha256:d5cd3ab21acbdb414bb6c31958d7b06b85eeb40f66463c264a9b343a4e238642", + "sha256:dfbac4c2dfcc082fcf8d942d1e49b6aa0766c19d3358bd86e2000bf0fa4a9cf0", + "sha256:e235688f42b36be2b6b06fc37ac2126a73b75fb8d6bc66dd632aa35286238703", + "sha256:eb82dbba47a8318e75f679690190c10a5e1f447fbf9df41cbc4c3afd726d88cb", + "sha256:ebb86518203e12e96af765ee89034a1dbb0c3c65052d1b0c19bbbd6af8a145e1", + "sha256:ee78feb9d293c323b59a6f2dd441b63339a30edf35abcb51187d2fc26e696d13", + "sha256:eedab4c310c0299961ac285591acd53dc6723a1ebd90a57207c71f6e0c2153ab", + "sha256:efa568b885bca461f7c7b9e032655c0c143d305bf01c30caf6db2854a4532b38", + "sha256:efce6ae830831ab6a22b9b4091d411698145cb9b8fc869e1397ccf4b4b6455cb", + "sha256:f163d2fd041c630fed01bc48d28c3ed4a3b003c00acd396900e11ee5316b56bb", + "sha256:f20380df709d91525e4bee04746ba612a4df0972c1b8f8e1e8af997e678c7b81", + "sha256:f30f1928162e189091cf4d9da2eac617bfe78ef907a761614ff577ef4edfb3c8", + "sha256:f470c92737afa7d4c3aacc001e335062d582053d4dbe73cda126f2d7031068dd", + "sha256:ff8bf625fe85e119553b5383ba0fb6aa3d0ec2ae980295aaefa552374926b3f4" + ], + "markers": "python_version >= '3.7'", + "version": "==1.3.3" + }, "idna": { "hashes": [ "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4", @@ -375,6 +572,94 @@ "markers": "python_version >= '3.7'", "version": "==0.1.2" }, + "multidict": { + "hashes": [ + "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9", + "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8", + "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03", + "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710", + "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161", + "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664", + "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569", + "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067", + "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313", + "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706", + "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2", + "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636", + "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49", + "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93", + "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603", + "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0", + "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60", + "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4", + "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e", + "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1", + "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60", + "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951", + "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc", + "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe", + "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95", + "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d", + "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8", + "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed", + "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2", + "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775", + "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87", + "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c", + "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2", + "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98", + "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3", + "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe", + "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78", + "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660", + "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176", + "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e", + "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988", + "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c", + "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c", + "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0", + "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449", + "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f", + "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde", + "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5", + "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d", + "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac", + "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a", + "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9", + "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca", + "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11", + "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35", + "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063", + "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b", + "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982", + "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258", + "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1", + "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52", + "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480", + "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7", + "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461", + "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d", + "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc", + "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779", + "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a", + "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547", + "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0", + "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171", + "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf", + "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d", + "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba" + ], + "markers": "python_version >= '3.7'", + "version": "==6.0.4" + }, + "openai": { + "hashes": [ + "sha256:1f07ed06f1cfc6c25126107193726fe4cf476edcc4e1485cd9eb708f068f2606", + "sha256:63ca9f6ac619daef8c1ddec6d987fe6aa1c87a9bfdce31ff253204d077222375" + ], + "index": "pypi", + "version": "==0.27.6" + }, "ordered-set": { "hashes": [ "sha256:046e1132c71fcf3330438a539928932caf51ddbc582496833e23de611de14562", @@ -446,6 +731,14 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.16.0" }, + "tqdm": { + "hashes": [ + "sha256:1871fb68a86b8fb3b59ca4cdd3dcccbc7e6d613eeed31f4c332531977b89beb5", + "sha256:c4f53a17fe37e132815abceec022631be8ffe1b9381c2e6e30aa70edc99e9671" + ], + "markers": "python_version >= '3.7'", + "version": "==4.65.0" + }, "typing-extensions": { "hashes": [ "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb", @@ -558,6 +851,86 @@ ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==1.15.0" + }, + "yarl": { + "hashes": [ + "sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571", + "sha256:066c163aec9d3d073dc9ffe5dd3ad05069bcb03fcaab8d221290ba99f9f69ee3", + "sha256:13414591ff516e04fcdee8dc051c13fd3db13b673c7a4cb1350e6b2ad9639ad3", + "sha256:149ddea5abf329752ea5051b61bd6c1d979e13fbf122d3a1f9f0c8be6cb6f63c", + "sha256:159d81f22d7a43e6eabc36d7194cb53f2f15f498dbbfa8edc8a3239350f59fe7", + "sha256:1b1bba902cba32cdec51fca038fd53f8beee88b77efc373968d1ed021024cc04", + "sha256:22a94666751778629f1ec4280b08eb11815783c63f52092a5953faf73be24191", + "sha256:2a96c19c52ff442a808c105901d0bdfd2e28575b3d5f82e2f5fd67e20dc5f4ea", + "sha256:2b0738fb871812722a0ac2154be1f049c6223b9f6f22eec352996b69775b36d4", + "sha256:2c315df3293cd521033533d242d15eab26583360b58f7ee5d9565f15fee1bef4", + "sha256:32f1d071b3f362c80f1a7d322bfd7b2d11e33d2adf395cc1dd4df36c9c243095", + "sha256:3458a24e4ea3fd8930e934c129b676c27452e4ebda80fbe47b56d8c6c7a63a9e", + "sha256:38a3928ae37558bc1b559f67410df446d1fbfa87318b124bf5032c31e3447b74", + "sha256:3da8a678ca8b96c8606bbb8bfacd99a12ad5dd288bc6f7979baddd62f71c63ef", + "sha256:494053246b119b041960ddcd20fd76224149cfea8ed8777b687358727911dd33", + "sha256:50f33040f3836e912ed16d212f6cc1efb3231a8a60526a407aeb66c1c1956dde", + "sha256:52a25809fcbecfc63ac9ba0c0fb586f90837f5425edfd1ec9f3372b119585e45", + "sha256:53338749febd28935d55b41bf0bcc79d634881195a39f6b2f767870b72514caf", + "sha256:5415d5a4b080dc9612b1b63cba008db84e908b95848369aa1da3686ae27b6d2b", + "sha256:5610f80cf43b6202e2c33ba3ec2ee0a2884f8f423c8f4f62906731d876ef4fac", + "sha256:566185e8ebc0898b11f8026447eacd02e46226716229cea8db37496c8cdd26e0", + "sha256:56ff08ab5df8429901ebdc5d15941b59f6253393cb5da07b4170beefcf1b2528", + "sha256:59723a029760079b7d991a401386390c4be5bfec1e7dd83e25a6a0881859e716", + "sha256:5fcd436ea16fee7d4207c045b1e340020e58a2597301cfbcfdbe5abd2356c2fb", + "sha256:61016e7d582bc46a5378ffdd02cd0314fb8ba52f40f9cf4d9a5e7dbef88dee18", + "sha256:63c48f6cef34e6319a74c727376e95626f84ea091f92c0250a98e53e62c77c72", + "sha256:646d663eb2232d7909e6601f1a9107e66f9791f290a1b3dc7057818fe44fc2b6", + "sha256:662e6016409828ee910f5d9602a2729a8a57d74b163c89a837de3fea050c7582", + "sha256:674ca19cbee4a82c9f54e0d1eee28116e63bc6fd1e96c43031d11cbab8b2afd5", + "sha256:6a5883464143ab3ae9ba68daae8e7c5c95b969462bbe42e2464d60e7e2698368", + "sha256:6e7221580dc1db478464cfeef9b03b95c5852cc22894e418562997df0d074ccc", + "sha256:75df5ef94c3fdc393c6b19d80e6ef1ecc9ae2f4263c09cacb178d871c02a5ba9", + "sha256:783185c75c12a017cc345015ea359cc801c3b29a2966c2655cd12b233bf5a2be", + "sha256:822b30a0f22e588b32d3120f6d41e4ed021806418b4c9f0bc3048b8c8cb3f92a", + "sha256:8288d7cd28f8119b07dd49b7230d6b4562f9b61ee9a4ab02221060d21136be80", + "sha256:82aa6264b36c50acfb2424ad5ca537a2060ab6de158a5bd2a72a032cc75b9eb8", + "sha256:832b7e711027c114d79dffb92576acd1bd2decc467dec60e1cac96912602d0e6", + "sha256:838162460b3a08987546e881a2bfa573960bb559dfa739e7800ceeec92e64417", + "sha256:83fcc480d7549ccebe9415d96d9263e2d4226798c37ebd18c930fce43dfb9574", + "sha256:84e0b1599334b1e1478db01b756e55937d4614f8654311eb26012091be109d59", + "sha256:891c0e3ec5ec881541f6c5113d8df0315ce5440e244a716b95f2525b7b9f3608", + "sha256:8c2ad583743d16ddbdf6bb14b5cd76bf43b0d0006e918809d5d4ddf7bde8dd82", + "sha256:8c56986609b057b4839968ba901944af91b8e92f1725d1a2d77cbac6972b9ed1", + "sha256:8ea48e0a2f931064469bdabca50c2f578b565fc446f302a79ba6cc0ee7f384d3", + "sha256:8ec53a0ea2a80c5cd1ab397925f94bff59222aa3cf9c6da938ce05c9ec20428d", + "sha256:95d2ecefbcf4e744ea952d073c6922e72ee650ffc79028eb1e320e732898d7e8", + "sha256:9b3152f2f5677b997ae6c804b73da05a39daa6a9e85a512e0e6823d81cdad7cc", + "sha256:9bf345c3a4f5ba7f766430f97f9cc1320786f19584acc7086491f45524a551ac", + "sha256:a60347f234c2212a9f0361955007fcf4033a75bf600a33c88a0a8e91af77c0e8", + "sha256:a74dcbfe780e62f4b5a062714576f16c2f3493a0394e555ab141bf0d746bb955", + "sha256:a83503934c6273806aed765035716216cc9ab4e0364f7f066227e1aaea90b8d0", + "sha256:ac9bb4c5ce3975aeac288cfcb5061ce60e0d14d92209e780c93954076c7c4367", + "sha256:aff634b15beff8902d1f918012fc2a42e0dbae6f469fce134c8a0dc51ca423bb", + "sha256:b03917871bf859a81ccb180c9a2e6c1e04d2f6a51d953e6a5cdd70c93d4e5a2a", + "sha256:b124e2a6d223b65ba8768d5706d103280914d61f5cae3afbc50fc3dfcc016623", + "sha256:b25322201585c69abc7b0e89e72790469f7dad90d26754717f3310bfe30331c2", + "sha256:b7232f8dfbd225d57340e441d8caf8652a6acd06b389ea2d3222b8bc89cbfca6", + "sha256:b8cc1863402472f16c600e3e93d542b7e7542a540f95c30afd472e8e549fc3f7", + "sha256:b9a4e67ad7b646cd6f0938c7ebfd60e481b7410f574c560e455e938d2da8e0f4", + "sha256:be6b3fdec5c62f2a67cb3f8c6dbf56bbf3f61c0f046f84645cd1ca73532ea051", + "sha256:bf74d08542c3a9ea97bb8f343d4fcbd4d8f91bba5ec9d5d7f792dbe727f88938", + "sha256:c027a6e96ef77d401d8d5a5c8d6bc478e8042f1e448272e8d9752cb0aff8b5c8", + "sha256:c0c77533b5ed4bcc38e943178ccae29b9bcf48ffd1063f5821192f23a1bd27b9", + "sha256:c1012fa63eb6c032f3ce5d2171c267992ae0c00b9e164efe4d73db818465fac3", + "sha256:c3a53ba34a636a256d767c086ceb111358876e1fb6b50dfc4d3f4951d40133d5", + "sha256:d4e2c6d555e77b37288eaf45b8f60f0737c9efa3452c6c44626a5455aeb250b9", + "sha256:de119f56f3c5f0e2fb4dee508531a32b069a5f2c6e827b272d1e0ff5ac040333", + "sha256:e65610c5792870d45d7b68c677681376fcf9cc1c289f23e8e8b39c1485384185", + "sha256:e9fdc7ac0d42bc3ea78818557fab03af6181e076a2944f43c38684b4b6bed8e3", + "sha256:ee4afac41415d52d53a9833ebae7e32b344be72835bbb589018c9e938045a560", + "sha256:f364d3480bffd3aa566e886587eaca7c8c04d74f6e8933f3f2c996b7f09bee1b", + "sha256:f3b078dbe227f79be488ffcfc7a9edb3409d018e0952cf13f15fd6512847f3f7", + "sha256:f4e2d08f07a3d7d3e12549052eb5ad3eab1c349c53ac51c209a0e5991bbada78", + "sha256:f7a3d8146575e08c29ed1cd287068e6d02f1c7bdff8970db96683b9591b86ee7" + ], + "markers": "python_version >= '3.7'", + "version": "==1.9.2" } }, "develop": {} diff --git a/README.md b/README.md index a22eb6d..2df5439 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ # LingoSynth LingoSynth is a free AI rephrasing & facts checking tool. +## Progress +How much we are to the goal of fooling these services: + +| Detector | Status | +| ---------- | ------ | +| gptzero.me | 50% | +| zerogpt.com | 60% | + ## Star History [![Star History Chart](https://api.star-history.com/svg?repos=Luna-OSS/LingoSynth&type=Date)](https://star-history.com/#Luna-OSS/LingoSynth&Date) diff --git a/lingosynth/app/__init__.py b/lingosynth/app/__init__.py index 5e4ecdb..b013c78 100644 --- a/lingosynth/app/__init__.py +++ b/lingosynth/app/__init__.py @@ -1,7 +1,6 @@ """Flask app for the backend of the project.""" import flask -import authlib import flask_cors import flask_limiter diff --git a/lingosynth/app/ai.py b/lingosynth/app/ai.py index dc3dddb..138c92e 100644 --- a/lingosynth/app/ai.py +++ b/lingosynth/app/ai.py @@ -3,12 +3,11 @@ import openai from dotenv import load_dotenv -import prompts - load_dotenv() if os.getenv('OPENAI_API_BASE'): openai.api_base = os.getenv('OPENAI_API_BASE') + openai.api_key = os.getenv('OPENAI_API_KEY') MODEL = os.getenv('OPENAI_CHAT_MODEL') or 'gpt-3.5-turbo' @@ -19,9 +18,8 @@ def generate(messages: str): return openai.ChatCompletion.create( model=MODEL, messages=messages, - temperature=0.9 - ).choices[0].message.content + temperature=0.9, + frequency_penalty=0.2, + presence_penalty=0.6, -if __name__ == '__main__': - print(prompts.MESSAGES) - # print(generate(prompts.MESSAGES)) + ).choices[0].message.content diff --git a/lingosynth/app/api.py b/lingosynth/app/api.py index 07eeab8..964cac6 100644 --- a/lingosynth/app/api.py +++ b/lingosynth/app/api.py @@ -1,17 +1,21 @@ -import time import flask +from . import ai, prompts + def register(app: flask.Flask): @app.route('/api/rephrase', methods=['GET', 'POST']) @app.rate_limiter.limit('2 per second') def api_rephrase(): text = flask.request.args.get('text') or flask.request.json.get('text') - time.sleep(3) - raise + messages = prompts.MESSAGES + messages.append({ + 'role': 'user', + 'content': text + }) return flask.jsonify( { - 'text': 'Done.' + 'text': ai.generate(messages) } ) diff --git a/lingosynth/app/prompts.py b/lingosynth/app/prompts.py index 7542e9d..2acab79 100644 --- a/lingosynth/app/prompts.py +++ b/lingosynth/app/prompts.py @@ -10,25 +10,30 @@ MESSAGES = [ Your main goal is to get a very high level of Perplexity and Burstiness (A document's perplexity is a measurement of the randomness of the text and A document's burstiness is a measurement of the variation in perplexity). You have to follow these rules: - + - The most important thing is to make your text sound like it was written by a human! - You can and should switch some sentences around, and you can also add or remove paragraphs. - Add or remove sentences as needed. +- Aim for a mix of short and long sentences. - Vary sentence length and structure, and try to not repeat words or phrases. - Ensure that the text is not uniform. - Use original, never-seen-before utterances that are improvised on the spot entirely themed on the talking point. - Use strong choice words to express your raw and candid emotions. -- DO NOT talk in a monotonous manner, instead, sound more relaxed, casual, and a bit humorous. - Don't use too many technical terms, instead, use more common words. - Avoid the same structure, instead, write more freely. -- Talk naturally, just like a human would. +- Talk naturally and varied, just like a human would. - Change the sentence structure and word choice to reflect the same meaning. - The paraphrased text should be readable and make sense. - Don't make it more complicated, instead focus on making it more unique. - Moreover, it's also very important that you keep the style. If it's a poem, make sure it still sounds like one after paraphrasing it. - Talk naturally. Don't use too many difficult terms, instead, use more common words. -- Write in a relaxed and casual manner. -- Make your text more random. Change words to more natural ones.""", +- Write in a relaxed and casual manner +- Make your text more random. Change words to more natural ones. +- DO NOT talk in a monotonous manner, instead, sound more relaxed, casual. +- DO NOT use colloquial language! COMPLETELY AVOID "WTF", "FTW, "OMG", "BFF", "LOL", "LMAO", "IDK", "TBH", "JK", "FYI", "IMHO", "IRL" DO NOT USE THEM +- DO NOT use slang at all! Use formal language, but make it sound natural. +- Sound like a high school teacher. Use a formal tone.""", + }, { "role": "user", @@ -50,9 +55,18 @@ You have to follow these rules: In conclusion, building confidence and staying motivated is a lifelong journey that requires consistent effort and practice. By setting clear goals, practicing self-care, building a support system, learning new skills, embracing failure, challenging negative self-talk, and taking action, you can increase your confidence and motivation levels and achieve your goals. Remember to be patient with yourself, and don't give up when faced with obstacles. With persistence and dedication, you can build the confidence and motivation you need to succeed.""", }, - # { - # "role": "assistant", - # "content": """ - # """, - # }, + { + "role": "assistant", + "content": """Reaching your full potential and achieving your goals can require a strong foundation of confidence and unwavering motivation. With life's unpredictable twists and turns, we might often find ourselves questioning our abilities and feeling discouraged by setbacks. But fear not! Because by adopting the right mindset, you can fight the feeling of not being able to achieve something. Let's get started! + +- 1. Establish Clear Objectives: Firstly, you need to set simple, yet efficient daily goals. Take some time to write them down, e.g. on a notepad. Make sure they are realistic, though. Break them down into smaller milestones and check your progress regularly. +- 2. Focus on Self-Care: Consume healthy foods, get sufficient sleep, get your regular exercise, and take time for activities that make you happy. +- 3. Surround Yourself With Positivity: Meet people who make you feel more confident and happy. Look for coaches and friends who can provide guidance and encouragement when you need it. Additionally, consider joining groups or communities that align with your interests and values. +- 4. Learn Something New: Expand your knowledge and abilities. Join courses or workshops, read books, and look for opportunities to apply what you have learned in real-life situations. +- 5. Embrace Failure: Failure is a completely normal, and you have to see it as an opportunity for your personal growth. See it more as a chance to learn and improve, Remember that even the most successful people have encountered failure numerous times before achieving their goals. +- 6. Confront Negative Self-Talk: Negative self-talk can undermine your confidence and motivation. Challenge pessimistic thoughts and replace them with positive affirmations. Practice acknowledging your strengths and accomplishments. Direct your focus towards the progress you have made, rather than looking back. +- 7. Take Action: Ultimately, taking action is the cornerstone of developing confidence and motivation. Set clear goals, develop a plan, and take small steps towards their achievement. Celebrate each little milestone you reach along the way and do not hesitate to seek assistance when needed. + +To sum up, building confidence and maintaining motivation is an ongoing process that requires consistent effort and practice. Believe in yourself! Remember to stay patient and persist in the face of obstacles. With enough dedication and focus, you can develop the confidence and motivation necessary for success.""", + } ] \ No newline at end of file diff --git a/lingosynth/app/static/css/_vars.sass b/lingosynth/app/static/css/_vars.sass index cc0d2cc..c43c997 100644 --- a/lingosynth/app/static/css/_vars.sass +++ b/lingosynth/app/static/css/_vars.sass @@ -8,7 +8,7 @@ $accent: #268678 $accent-bg: #1c6e63 $accent-dead: #54867e -$teal: #3f8a90 +$teal: #2bafb9 $text: #eaedf7 $subtext1: #b8c0e0 diff --git a/lingosynth/app/static/css/input.css.map b/lingosynth/app/static/css/input.css.map index ec1486a..b898db1 100644 --- a/lingosynth/app/static/css/input.css.map +++ b/lingosynth/app/static/css/input.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["input.sass","_vars.sass"],"names":[],"mappings":"AAEA;EACI;IACI;;EACJ;IACI;;;AAGR;EACI;IACI,YCHM;;EDKV;IACI,YCRC;;;ADUT;EACI;IACI;;EAEJ;IACI;;;AAER;EACI;EACA;EACA,YCNO;EDOP;EACA;;AAEA;EACI;EACA;EAKA;;AAHA;EACI;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAEZ;EACI;EACA;EACA;EACA;EACA;EACA,YCtCO;EDuCP,OC/CG;EDgDH;EACA;EACA;EAEA;EAEA;;;AAEJ;EACI;EACA;EACA;EACA,YCjEQ;EDkER;EACA;EACA;EAEA,OCjEG;;ADmEH;EACI,YC1EC;;AD4EL;EACI;EACA;;;AAGR;EACI;EACA","sourcesContent":["@import '_vars'\r\n\r\n@keyframes rotate-gradient\r\n from\r\n transform: rotate(0deg) scale(2)\r\n to\r\n transform: rotate(360deg) scale(2)\r\n\r\n\r\n@keyframes pulsing\r\n 0%\r\n background: $accent-dead\r\n \r\n 100%\r\n background: $accent\r\n\r\n@keyframes rotate\r\n 0%\r\n transform: rotate(0deg)\r\n \r\n 100%\r\n transform: rotate(360deg)\r\n\r\ndiv.input-wrapper\r\n position: relative\r\n overflow: hidden\r\n background: $surface0\r\n padding: 2px 3px\r\n border-radius: 0.5rem\r\n\r\n &.loading\r\n cursor: wait !important\r\n position: relative\r\n\r\n *\r\n pointer-events: none\r\n\r\n animation: pulsing 1s ease-in-out infinite alternate\r\n\r\n &::before\r\n content: ''\r\n display: block\r\n z-index: -1\r\n position: absolute\r\n top: 1rem\r\n left: 1rem\r\n right: 1rem\r\n bottom: 1rem\r\n\r\n background-image: conic-gradient(from 0deg, $accent, $yellow, $accent)\r\n animation: rotate-gradient 1s linear infinite\r\n\r\ntextarea\r\n width: 100%\r\n height: 300px\r\n font-size: 1.5rem\r\n padding: 1rem\r\n border-radius: 0.5rem\r\n background: $surface0\r\n color: $text\r\n resize: none\r\n outline: none\r\n transition: border 0.1s ease-in-out\r\n\r\n min-height: 300px\r\n\r\n box-shadow: 0 0 40px 0 $crust\r\n\r\nbutton\r\n margin-top: 1rem\r\n padding: 0.8rem 1.5rem\r\n border-radius: 0.5rem\r\n background: $accent-bg\r\n font-size: 18px\r\n cursor: pointer\r\n transition: background 0.1s ease-in-out\r\n\r\n color: $text\r\n\r\n &:hover\r\n background: $accent\r\n\r\n &.loading\r\n cursor: wait\r\n animation: pulsing 1s ease-in-out infinite alternate\r\n // pointer-events: none\r\n\r\ni.ti.ti-loader-2\r\n display: inline-block\r\n animation: rotate 1s linear infinite\r\n","$red: #ed8796\r\n$maroon: #ee99a0\r\n$peach: #f5a97f\r\n$yellow: #eed49f\r\n$green: #a6da95\r\n\r\n$accent: #268678\r\n$accent-bg: #1c6e63\r\n$accent-dead: #54867e\r\n\r\n$teal: #3f8a90\r\n\r\n$text: #eaedf7\r\n$subtext1: #b8c0e0\r\n$subtext0: #a5adcb\r\n$overlay2: #939ab7\r\n$overlay1: #8087a2\r\n$overlay0: #6e738d\r\n$surface2: #5b6078\r\n$surface1: #494d64\r\n$surface0: #363a4f\r\n$base: #24273a\r\n$mantle: #1e2030\r\n$crust: #181926"]} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["input.sass","_vars.sass"],"names":[],"mappings":"AAEA;EACI;IACI;;EACJ;IACI;;;AAGR;EACI;IACI,YCHM;;EDKV;IACI,YCRC;;;ADUT;EACI;IACI;;EAEJ;IACI;;;AAER;EACI;EACA;EACA,YCNO;EDOP;EACA;;AAEA;EACI;EACA;EAKA;;AAHA;EACI;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;;AAEZ;EACI;EACA;EACA;EACA;EACA;EACA,YCtCO;EDuCP,OC/CG;EDgDH;EACA;EACA;EAEA;EAEA;;;AAEJ;EACI;EACA;EACA;EACA,YCjEQ;EDkER;EACA;EACA;EAEA,OCjEG;;ADmEH;EACI,YC1EC;;AD4EL;EACI;EACA;;;AAGR;EACI;EACA","sourcesContent":["@import '_vars'\r\n\r\n@keyframes rotate-gradient\r\n from\r\n transform: rotate(0deg) scale(2)\r\n to\r\n transform: rotate(360deg) scale(2)\r\n\r\n\r\n@keyframes pulsing\r\n 0%\r\n background: $accent-dead\r\n \r\n 100%\r\n background: $accent\r\n\r\n@keyframes rotate\r\n 0%\r\n transform: rotate(0deg)\r\n \r\n 100%\r\n transform: rotate(360deg)\r\n\r\ndiv.input-wrapper\r\n position: relative\r\n overflow: hidden\r\n background: $surface0\r\n padding: 2px 3px\r\n border-radius: 0.5rem\r\n\r\n &.loading\r\n cursor: wait !important\r\n position: relative\r\n\r\n *\r\n pointer-events: none\r\n\r\n animation: pulsing 1s ease-in-out infinite alternate\r\n\r\n &::before\r\n content: ''\r\n display: block\r\n z-index: -1\r\n position: absolute\r\n top: 1rem\r\n left: 1rem\r\n right: 1rem\r\n bottom: 1rem\r\n\r\n background-image: conic-gradient(from 0deg, $accent, $yellow, $accent)\r\n animation: rotate-gradient 1s linear infinite\r\n\r\ntextarea\r\n width: 100%\r\n height: 300px\r\n font-size: 1.5rem\r\n padding: 1rem\r\n border-radius: 0.5rem\r\n background: $surface0\r\n color: $text\r\n resize: none\r\n outline: none\r\n transition: border 0.1s ease-in-out\r\n\r\n min-height: 300px\r\n\r\n box-shadow: 0 0 40px 0 $crust\r\n\r\nbutton\r\n margin-top: 1rem\r\n padding: 0.8rem 1.5rem\r\n border-radius: 0.5rem\r\n background: $accent-bg\r\n font-size: 18px\r\n cursor: pointer\r\n transition: background 0.1s ease-in-out\r\n\r\n color: $text\r\n\r\n &:hover\r\n background: $accent\r\n\r\n &.loading\r\n cursor: wait\r\n animation: pulsing 1s ease-in-out infinite alternate\r\n // pointer-events: none\r\n\r\ni.ti.ti-loader-2\r\n display: inline-block\r\n animation: rotate 1s linear infinite\r\n","$red: #ed8796\r\n$maroon: #ee99a0\r\n$peach: #f5a97f\r\n$yellow: #eed49f\r\n$green: #a6da95\r\n\r\n$accent: #268678\r\n$accent-bg: #1c6e63\r\n$accent-dead: #54867e\r\n\r\n$teal: #2bafb9\r\n\r\n$text: #eaedf7\r\n$subtext1: #b8c0e0\r\n$subtext0: #a5adcb\r\n$overlay2: #939ab7\r\n$overlay1: #8087a2\r\n$overlay0: #6e738d\r\n$surface2: #5b6078\r\n$surface1: #494d64\r\n$surface0: #363a4f\r\n$base: #24273a\r\n$mantle: #1e2030\r\n$crust: #181926"]} \ No newline at end of file diff --git a/lingosynth/app/static/css/landing.css b/lingosynth/app/static/css/landing.css index 7685d27..c9e370d 100644 --- a/lingosynth/app/static/css/landing.css +++ b/lingosynth/app/static/css/landing.css @@ -11,7 +11,7 @@ header p { } .gradient-text { - background: -webkit-linear-gradient(45deg, #a6da95, #3f8a90); + background: -webkit-linear-gradient(45deg, #a6da95, #2bafb9); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }/*# sourceMappingURL=landing.css.map */ \ No newline at end of file diff --git a/lingosynth/app/static/css/main.css b/lingosynth/app/static/css/main.css index 013a08e..42e1faf 100644 --- a/lingosynth/app/static/css/main.css +++ b/lingosynth/app/static/css/main.css @@ -20,6 +20,14 @@ nav, header, main, footer { margin: 0 auto; } +main { + margin-block: 3rem; +} + +p, li { + line-height: 1.7; +} + nav a { opacity: 0.8; text-decoration: none; @@ -30,6 +38,5 @@ nav a:hover { } footer { - margin-top: 2rem; opacity: 0.5; }/*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/lingosynth/app/static/css/main.css.map b/lingosynth/app/static/css/main.css.map index fff3cf2..04571f9 100644 --- a/lingosynth/app/static/css/main.css.map +++ b/lingosynth/app/static/css/main.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["main.sass","_vars.sass"],"names":[],"mappings":"AAEA;EACI;;;AAEJ;EACI;EACA,kBCcG;;;ADZP;EACI,OCEG;EDDH;EACA;EACA;EACA;;;AAEJ;EACI;EACA;;;AAGA;EACI;EACA;EACA;;AAEA;EACI;;;AAEZ;EACI;EACA","sourcesContent":["@import '_vars'\r\n\r\nhtml\r\n scroll-behavior: smooth\r\n\r\nbody\r\n margin: 1rem\r\n background-color: $base\r\n\r\n*\r\n color: $text\r\n border: none\r\n outline: none\r\n box-sizing: border-box\r\n font-family: 'Inter', sans-serif\r\n\r\nnav, header, main, footer\r\n max-width: 800px\r\n margin: 0 auto\r\n\r\nnav\r\n a\r\n opacity: 0.8\r\n text-decoration: none\r\n margin-right: 1rem\r\n\r\n &:hover\r\n opacity: 1\r\n\r\nfooter\r\n margin-top: 2rem\r\n opacity: 0.5\r\n","$red: #ed8796\r\n$maroon: #ee99a0\r\n$peach: #f5a97f\r\n$yellow: #eed49f\r\n$green: #a6da95\r\n\r\n$accent: #268678\r\n$accent-bg: #1c6e63\r\n$accent-dead: #54867e\r\n\r\n$teal: #3f8a90\r\n\r\n$text: #eaedf7\r\n$subtext1: #b8c0e0\r\n$subtext0: #a5adcb\r\n$overlay2: #939ab7\r\n$overlay1: #8087a2\r\n$overlay0: #6e738d\r\n$surface2: #5b6078\r\n$surface1: #494d64\r\n$surface0: #363a4f\r\n$base: #24273a\r\n$mantle: #1e2030\r\n$crust: #181926"]} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["main.sass","_vars.sass"],"names":[],"mappings":"AAEA;EACI;;;AAEJ;EACI;EACA,kBCcG;;;ADZP;EACI,OCEG;EDDH;EACA;EACA;EACA;;;AAEJ;EACI;EACA;;;AAEJ;EACI;;;AAEJ;EACI;;;AAGA;EACI;EACA;EACA;;AAEA;EACI;;;AAEZ;EACI","sourcesContent":["@import '_vars'\r\n\r\nhtml\r\n scroll-behavior: smooth\r\n\r\nbody\r\n margin: 1rem\r\n background-color: $base\r\n\r\n*\r\n color: $text\r\n border: none\r\n outline: none\r\n box-sizing: border-box\r\n font-family: 'Inter', sans-serif\r\n\r\nnav, header, main, footer\r\n max-width: 800px\r\n margin: 0 auto\r\n\r\nmain\r\n margin-block: 3rem\r\n\r\np, li\r\n line-height: 1.7\r\n\r\nnav\r\n a\r\n opacity: 0.8\r\n text-decoration: none\r\n margin-right: 1rem\r\n\r\n &:hover\r\n opacity: 1\r\n\r\nfooter\r\n opacity: 0.5\r\n","$red: #ed8796\r\n$maroon: #ee99a0\r\n$peach: #f5a97f\r\n$yellow: #eed49f\r\n$green: #a6da95\r\n\r\n$accent: #268678\r\n$accent-bg: #1c6e63\r\n$accent-dead: #54867e\r\n\r\n$teal: #2bafb9\r\n\r\n$text: #eaedf7\r\n$subtext1: #b8c0e0\r\n$subtext0: #a5adcb\r\n$overlay2: #939ab7\r\n$overlay1: #8087a2\r\n$overlay0: #6e738d\r\n$surface2: #5b6078\r\n$surface1: #494d64\r\n$surface0: #363a4f\r\n$base: #24273a\r\n$mantle: #1e2030\r\n$crust: #181926"]} \ No newline at end of file diff --git a/lingosynth/app/static/css/main.sass b/lingosynth/app/static/css/main.sass index f5c2f99..c16a7be 100644 --- a/lingosynth/app/static/css/main.sass +++ b/lingosynth/app/static/css/main.sass @@ -18,6 +18,12 @@ nav, header, main, footer max-width: 800px margin: 0 auto +main + margin-block: 3rem + +p, li + line-height: 1.7 + nav a opacity: 0.8 @@ -28,5 +34,4 @@ nav opacity: 1 footer - margin-top: 2rem opacity: 0.5 diff --git a/lingosynth/app/static/css/utils.css b/lingosynth/app/static/css/utils.css index 63f3864..e151e20 100644 --- a/lingosynth/app/static/css/utils.css +++ b/lingosynth/app/static/css/utils.css @@ -5,10 +5,22 @@ div.alert { border-left: 0.5rem solid #268678; background: #494d64; transition: opacity 0.5s ease-in-out; + position: relative; } div.alert.effect { opacity: 0; } div.alert.error { border-left-color: #ed8796; +} +div.alert i.ti.ti-x { + position: absolute; + top: 0.5rem; + right: 0.5rem; + font-size: 1.5rem; + cursor: pointer; + transition: color 0.1s ease-in-out; +} +div.alert i.ti.ti-x:hover { + color: #ed8796; }/*# sourceMappingURL=utils.css.map */ \ No newline at end of file diff --git a/lingosynth/app/static/css/utils.css.map b/lingosynth/app/static/css/utils.css.map index 9da14a6..fb19c9e 100644 --- a/lingosynth/app/static/css/utils.css.map +++ b/lingosynth/app/static/css/utils.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["utils.sass","_vars.sass"],"names":[],"mappings":"AAEA;EACI;EACA;EACA;EACA;EACA,YCYO;EDXP;;AAEA;EACI;;AAEJ;EACI,mBCdF","sourcesContent":["@import '_vars'\r\n\r\ndiv.alert\r\n margin-block: 1rem\r\n padding: 1rem\r\n border-radius: 0.5rem\r\n border-left: 0.5rem solid $accent\r\n background: $surface1\r\n transition: opacity 0.5s ease-in-out\r\n\r\n &.effect\r\n opacity: 0\r\n\r\n &.error\r\n border-left-color: $red\r\n","$red: #ed8796\r\n$maroon: #ee99a0\r\n$peach: #f5a97f\r\n$yellow: #eed49f\r\n$green: #a6da95\r\n\r\n$accent: #268678\r\n$accent-bg: #1c6e63\r\n$accent-dead: #54867e\r\n\r\n$teal: #3f8a90\r\n\r\n$text: #eaedf7\r\n$subtext1: #b8c0e0\r\n$subtext0: #a5adcb\r\n$overlay2: #939ab7\r\n$overlay1: #8087a2\r\n$overlay0: #6e738d\r\n$surface2: #5b6078\r\n$surface1: #494d64\r\n$surface0: #363a4f\r\n$base: #24273a\r\n$mantle: #1e2030\r\n$crust: #181926"]} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["utils.sass","_vars.sass"],"names":[],"mappings":"AAEA;EACI;EACA;EACA;EACA;EACA,YCYO;EDXP;EACA;;AAEA;EACI;;AAEJ;EACI,mBCfF;;ADiBF;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI,OC1BN","sourcesContent":["@import '_vars'\r\n\r\ndiv.alert\r\n margin-block: 1rem\r\n padding: 1rem\r\n border-radius: 0.5rem\r\n border-left: 0.5rem solid $accent\r\n background: $surface1\r\n transition: opacity 0.5s ease-in-out\r\n position: relative\r\n\r\n &.effect\r\n opacity: 0\r\n\r\n &.error\r\n border-left-color: $red\r\n\r\n i.ti.ti-x\r\n position: absolute\r\n top: 0.5rem\r\n right: 0.5rem\r\n font-size: 1.5rem\r\n cursor: pointer\r\n transition: color 0.1s ease-in-out\r\n\r\n &:hover\r\n color: $red\r\n","$red: #ed8796\r\n$maroon: #ee99a0\r\n$peach: #f5a97f\r\n$yellow: #eed49f\r\n$green: #a6da95\r\n\r\n$accent: #268678\r\n$accent-bg: #1c6e63\r\n$accent-dead: #54867e\r\n\r\n$teal: #2bafb9\r\n\r\n$text: #eaedf7\r\n$subtext1: #b8c0e0\r\n$subtext0: #a5adcb\r\n$overlay2: #939ab7\r\n$overlay1: #8087a2\r\n$overlay0: #6e738d\r\n$surface2: #5b6078\r\n$surface1: #494d64\r\n$surface0: #363a4f\r\n$base: #24273a\r\n$mantle: #1e2030\r\n$crust: #181926"]} \ No newline at end of file diff --git a/lingosynth/app/static/css/utils.sass b/lingosynth/app/static/css/utils.sass index 10abd8c..a04d267 100644 --- a/lingosynth/app/static/css/utils.sass +++ b/lingosynth/app/static/css/utils.sass @@ -7,9 +7,21 @@ div.alert border-left: 0.5rem solid $accent background: $surface1 transition: opacity 0.5s ease-in-out + position: relative &.effect opacity: 0 &.error border-left-color: $red + + i.ti.ti-x + position: absolute + top: 0.5rem + right: 0.5rem + font-size: 1.5rem + cursor: pointer + transition: color 0.1s ease-in-out + + &:hover + color: $red diff --git a/lingosynth/app/static/js/index.js b/lingosynth/app/static/js/index.js index f5c5765..2bf42b0 100644 --- a/lingosynth/app/static/js/index.js +++ b/lingosynth/app/static/js/index.js @@ -34,11 +34,20 @@ function rephrase() { stopRephrasing(); console.error('Error:', error); + popups.innerHTML = ''; + const errorDiv = document.createElement('div'); errorDiv.className = 'error alert'; errorDiv.innerText = 'An error occurred. Please try again later.'; popups.appendChild(errorDiv); + const closeButton = document.createElement('i'); + closeButton.className = 'ti ti-x'; + closeButton.addEventListener('click', function() { + errorDiv.remove(); + } + ); + errorDiv.appendChild(closeButton); }); }; diff --git a/lingosynth/app/templates/index.html b/lingosynth/app/templates/index.html index c041819..800f134 100644 --- a/lingosynth/app/templates/index.html +++ b/lingosynth/app/templates/index.html @@ -43,6 +43,8 @@ Rephrase +

This can take several minutes for longer texts!

+

Feel free to visit another browser tab if you want to.

{% endblock %} {% block scripts %} diff --git a/text.txt b/text.txt deleted file mode 100644 index e69de29..0000000