diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 18d95d0..0f196ff 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -31,8 +31,24 @@ jobs: - name: Build package run: poetry build + - name: Check version change + id: check_version + run: | + git fetch origin main + # Extract version from current pyproject.toml + current_version=$(poetry version -s) + # Extract version from main branch pyproject.toml + main_version=$(git show origin/main:pyproject.toml | grep "^version = " | cut -d'"' -f2) + if [ "$current_version" != "$main_version" ]; then + echo "Version changed from $main_version to $current_version" + echo "version_changed=true" >> $GITHUB_OUTPUT + else + echo "Version unchanged" + echo "version_changed=false" >> $GITHUB_OUTPUT + fi + - name: Publish to PyPI - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.check_version.outputs.version_changed == 'true' uses: pypa/gh-action-pypi-publish@v1.4.2 with: user: __token__ diff --git a/extract_thinker/llm.py b/extract_thinker/llm.py index 3923a36..1af1218 100644 --- a/extract_thinker/llm.py +++ b/extract_thinker/llm.py @@ -59,10 +59,4 @@ def request( messages=messages ) - return response - - def batch_request(self, batch_requests: List[Dict[str, Any]]) -> str: - return self.batch_client.create_batch(batch_requests) - - def retrieve_batch_results(self, batch_id: str) -> BatchResult: - return self.batch_client.get_batch_results(batch_id) + return response \ No newline at end of file