summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yaml27
-rw-r--r--continuedev/main.py5
-rw-r--r--continuedev/src/continuedev/libs/util/count_tokens.py1
-rw-r--r--continuedev/src/run.py4
-rw-r--r--run.py4
5 files changed, 28 insertions, 13 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 6642d5c0..1d5f2cbc 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -18,14 +18,23 @@ jobs:
- name: Check-out repository
uses: actions/checkout@v3
- - name: Setup Python
- uses: actions/setup-python@v4
- with:
- python-version: "3.10" # Version range or exact version of a Python version to use, using SemVer's version range syntax
- architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified
- cache: "pip"
- cache-dependency-path: |
- **/requirements*.txt
+ - name: Install Poetry
+ run: |
+ curl -sSL https://install.python-poetry.org | python3 -
+
+ - name: Install Python dependencies
+ run: |
+ cd continuedev
+ poetry install
+
+ # - name: Setup Python
+ # uses: actions/setup-python@v4
+ # with:
+ # python-version: "3.10" # Version range or exact version of a Python version to use, using SemVer's version range syntax
+ # architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified
+ # cache: "pip"
+ # cache-dependency-path: |
+ # **/requirements*.txt
- name: Install Dependencies
run: |
@@ -35,7 +44,7 @@ jobs:
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
- script-name: kasa_cli
+ script-name: continuedev/src/run.py
onefile: true
- name: Upload Artifacts
diff --git a/continuedev/main.py b/continuedev/main.py
new file mode 100644
index 00000000..3cf4e817
--- /dev/null
+++ b/continuedev/main.py
@@ -0,0 +1,5 @@
+from .src.continuedev.server.main import run_server
+
+
+def main():
+ run_server()
diff --git a/continuedev/src/continuedev/libs/util/count_tokens.py b/continuedev/src/continuedev/libs/util/count_tokens.py
index 6add7b1a..3b594036 100644
--- a/continuedev/src/continuedev/libs/util/count_tokens.py
+++ b/continuedev/src/continuedev/libs/util/count_tokens.py
@@ -3,6 +3,7 @@ from typing import Dict, List, Union
from ...core.main import ChatMessage
from .templating import render_templated_string
from ...libs.llm import LLM
+from tiktoken_ext import openai_public
import tiktoken
# TODO move many of these into specific LLM.properties() function that
diff --git a/continuedev/src/run.py b/continuedev/src/run.py
deleted file mode 100644
index 089cc54d..00000000
--- a/continuedev/src/run.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from continuedev.server.main import run_server
-
-if __name__ == "__main__":
- run_server()
diff --git a/run.py b/run.py
new file mode 100644
index 00000000..7160bbc7
--- /dev/null
+++ b/run.py
@@ -0,0 +1,4 @@
+from continuedev.main import main
+
+if __name__ == "__main__":
+ main()