From 88cc5d813378eb2d8418b104fc2d36ae50e88edf Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:13:10 -1000 Subject: [PATCH 1/2] Add tiktoken recipe --- pythonforandroid/recipes/tiktoken/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pythonforandroid/recipes/tiktoken/__init__.py diff --git a/pythonforandroid/recipes/tiktoken/__init__.py b/pythonforandroid/recipes/tiktoken/__init__.py new file mode 100644 index 000000000..a6145f9bf --- /dev/null +++ b/pythonforandroid/recipes/tiktoken/__init__.py @@ -0,0 +1,12 @@ +from pythonforandroid.recipe import RustCompiledComponentsRecipe + + +class TiktokenRecipe(RustCompiledComponentsRecipe): + name = 'tiktoken' + version = '0.7.0' + url = 'https://github.com/openai/tiktoken/archive/refs/tags/{version}.tar.gz' + depends = ['regex','requests'] + + +recipe = TiktokenRecipe() + From 18b1bd675d6eb83a5e0133fea7fa5d1e9ce03216 Mon Sep 17 00:00:00 2001 From: RobertF <34464649+RobertFlatt@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:18:53 -1000 Subject: [PATCH 2/2] Update __init__.py --- pythonforandroid/recipes/tiktoken/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pythonforandroid/recipes/tiktoken/__init__.py b/pythonforandroid/recipes/tiktoken/__init__.py index a6145f9bf..1c5407054 100644 --- a/pythonforandroid/recipes/tiktoken/__init__.py +++ b/pythonforandroid/recipes/tiktoken/__init__.py @@ -5,8 +5,7 @@ class TiktokenRecipe(RustCompiledComponentsRecipe): name = 'tiktoken' version = '0.7.0' url = 'https://github.com/openai/tiktoken/archive/refs/tags/{version}.tar.gz' - depends = ['regex','requests'] + depends = ['regex', 'requests'] recipe = TiktokenRecipe() -