From 0c2698be9215cc40dbccd79ba4d93bc0f8b31afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Tue, 14 Jan 2025 16:36:35 +0000 Subject: [PATCH 1/6] feat: add stepfun integrations --- .../llms/llama-index-llms-stepfun/.gitignore | 153 ++++++++++++++++++ .../llms/llama-index-llms-stepfun/BUILD | 3 + .../llms/llama-index-llms-stepfun/Makefile | 17 ++ .../llms/llama-index-llms-stepfun/README.md | 0 .../llama_index/llms/stepfun/BUILD | 1 + .../llama_index/llms/stepfun/__init__.py | 3 + .../llama_index/llms/stepfun/base.py | 61 +++++++ .../llama-index-llms-stepfun/pyproject.toml | 63 ++++++++ .../llms/llama-index-llms-stepfun/tests/BUILD | 0 .../tests/__init__.py | 0 .../tests/test_llms_stepfun.py | 7 + 11 files changed, 308 insertions(+) create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/BUILD create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/Makefile create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/README.md create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/tests/BUILD create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/tests/__init__.py create mode 100644 llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore b/llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore new file mode 100644 index 0000000000000..78041dee26261 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore @@ -0,0 +1,153 @@ +llama_index/_static +.DS_Store +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +bin/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +etc/ +include/ +lib/ +lib64/ +parts/ +sdist/ +share/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +.ruff_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints +notebooks/ + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +pyvenv.cfg + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# Jetbrains +.idea +modules/ +*.swp + +# VsCode +.vscode + +# pipenv +Pipfile +Pipfile.lock + +# pyright +pyrightconfig.json \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/BUILD b/llama-index-integrations/llms/llama-index-llms-stepfun/BUILD new file mode 100644 index 0000000000000..62294dc8415d0 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/BUILD @@ -0,0 +1,3 @@ +poetry_requirements( + name="poetry", +) \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/Makefile b/llama-index-integrations/llms/llama-index-llms-stepfun/Makefile new file mode 100644 index 0000000000000..40ef979652077 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/Makefile @@ -0,0 +1,17 @@ +GIT_ROOT ?= $(shell git rev-parse --show-toplevel) + +help: ## Show all Makefile targets. + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}' + +format: ## Run code autoformatters (black). + pre-commit install + git ls-files | xargs pre-commit run black --files + +lint: ## Run linters: pre-commit (black, ruff, codespell) and mypy + pre-commit install && git ls-files | xargs pre-commit run --show-diff-on-failure --files + +test: ## Run tests via pytest. + pytest tests + +watch-docs: ## Build and watch documentation. + sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(GIT_ROOT)/llama_index/ \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/README.md b/llama-index-integrations/llms/llama-index-llms-stepfun/README.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD new file mode 100644 index 0000000000000..2181f04b38f79 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD @@ -0,0 +1 @@ +python_sources() \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py new file mode 100644 index 0000000000000..a5e81ddfe8242 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py @@ -0,0 +1,3 @@ +from llama_index.llms.stepfun.base import StepFun + +__all__ = ["StepFun"] \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py new file mode 100644 index 0000000000000..250b22a325a16 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py @@ -0,0 +1,61 @@ +from typing import Any, Dict, Optional + +from llama_index.core.base.llms.types import LLMMetadata +from llama_index.core.bridge.pydantic import Field +from llama_index.core.constants import ( + DEFAULT_CONTEXT_WINDOW, + DEFAULT_NUM_OUTPUTS, + DEFAULT_TEMPERATURE, +) +from llama_index.core.base.llms.generic_utils import get_from_param_or_env +from llama_index.llms.openai_like import OpenAILike + +DEFAULT_API_BASE = "https://api.stepfun.com/v1" +DEFAULT_MODEL = "step-1v-8k" + + +class StepFun(OpenAILike): + + model: str = Field( + description="The Stepfun model to use. See https://platform.stepfun.com/docs/llm/modeloverview for options." + ) + context_window: int = Field( + default=DEFAULT_CONTEXT_WINDOW, + description="The maximum number of context tokens for the model. See https://platform.stepfun.com/docs/llm/modeloverview for options.", + gt=0, + ) + is_chat_model: bool = Field( + default=True, + description=LLMMetadata.model_fields["is_chat_model"].description, + ) + + def __init__( + self, + model: str = DEFAULT_MODEL, + temperature: float = DEFAULT_TEMPERATURE, + max_tokens: int = DEFAULT_NUM_OUTPUTS, + additional_kwargs: Optional[Dict[str, Any]] = None, + max_retries: int = 5, + api_base: Optional[str] = DEFAULT_API_BASE, + api_key: Optional[str] = None, + **kwargs: Any, + ) -> None: + additional_kwargs = additional_kwargs or {} + + api_base = get_from_param_or_env("api_base", api_base, "STEPFUN_API_BASE") + api_key = get_from_param_or_env("api_key", api_key, "STEPFUN_API_KEY") + + super().__init__( + model=model, + temperature=temperature, + max_tokens=max_tokens, + api_base=api_base, + api_key=api_key, + additional_kwargs=additional_kwargs, + max_retries=max_retries, + **kwargs, + ) + + @classmethod + def class_name(cls) -> str: + return "Stpefun_LLM" \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml new file mode 100644 index 0000000000000..4b0d1bf9799b9 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml @@ -0,0 +1,63 @@ +[build-system] +build-backend = "poetry.core.masonry.api" +requires = ["poetry-core"] + +[tool.codespell] +check-filenames = true +check-hidden = true +skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb" + +[tool.llamahub] +contains_example = false +import_path = "llama_index.llms.stepfun" + +[tool.llamahub.class_authors] +Stepfun = "llama-index" + +[tool.mypy] +disallow_untyped_defs = true +exclude = ["_static", "build", "examples", "notebooks", "venv"] +ignore_missing_imports = true +python_version = "3.8" + +[tool.poetry] +authors = ["Bestony "] +description = "llama-index llms stepfun integration" +exclude = ["**/BUILD"] +license = "MIT" +name = "llama-index-llms-stepfun" +readme = "README.md" +version = "0.3.1" + +[tool.poetry.dependencies] +python = ">=3.9,<4.0" +llama-index-llms-openai-like = "^0.3.1" +llama-index-core = "^0.12.0" + +[tool.poetry.group.dev.dependencies] +ipython = "8.10.0" +jupyter = "^1.0.0" +mypy = "0.991" +pre-commit = "3.2.0" +pylint = "2.15.10" +pytest = "7.2.1" +pytest-mock = "3.11.1" +ruff = "0.0.292" +tree-sitter-languages = "^1.8.0" +types-Deprecated = ">=0.1.0" +types-PyYAML = "^6.0.12.12" +types-protobuf = "^4.24.0.4" +types-redis = "4.5.5.0" +types-requests = "2.28.11.8" +types-setuptools = "67.1.0.0" + +[tool.poetry.group.dev.dependencies.black] +extras = ["jupyter"] +version = "<=23.9.1,>=23.7.0" + +[tool.poetry.group.dev.dependencies.codespell] +extras = ["toml"] +version = ">=v2.2.6" + +[[tool.poetry.packages]] +include = "llama_index/" \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/tests/BUILD b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/BUILD new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/tests/__init__.py b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py new file mode 100644 index 0000000000000..532fbd166a016 --- /dev/null +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py @@ -0,0 +1,7 @@ +from llama_index.core.base.llms.base import BaseLLM +from llama_index.llms.stepfun import StepFun + + +def test_text_inference_embedding_class(): + names_of_base_classes = [b.__name__ for b in StepFun.__mro__] + assert BaseLLM.__name__ in names_of_base_classes \ No newline at end of file From f1da85a676fabf96c517a132100639ec4c07bef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Tue, 14 Jan 2025 16:47:36 +0000 Subject: [PATCH 2/6] docs --- docs/docs/api_reference/llms/stepfun.md | 4 ++++ .../llms/llama-index-llms-stepfun/pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 docs/docs/api_reference/llms/stepfun.md diff --git a/docs/docs/api_reference/llms/stepfun.md b/docs/docs/api_reference/llms/stepfun.md new file mode 100644 index 0000000000000..75bd91c5494fd --- /dev/null +++ b/docs/docs/api_reference/llms/stepfun.md @@ -0,0 +1,4 @@ +::: llama_index.llms.stepfun + options: + members: + - StepFun \ No newline at end of file diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml index 4b0d1bf9799b9..648b8ff0d6da5 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml @@ -12,7 +12,7 @@ contains_example = false import_path = "llama_index.llms.stepfun" [tool.llamahub.class_authors] -Stepfun = "llama-index" +StepFun = "llama-index" [tool.mypy] disallow_untyped_defs = true From 86ca54da8678d2207f77b414de743148367c8353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Wed, 15 Jan 2025 10:53:20 +0000 Subject: [PATCH 3/6] feat: add readme.md & fix error in BUILD --- .../llms/llama-index-llms-stepfun/README.md | 51 +++++++++++++++++++ .../llms/llama-index-llms-stepfun/tests/BUILD | 1 + 2 files changed, 52 insertions(+) diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/README.md b/llama-index-integrations/llms/llama-index-llms-stepfun/README.md index e69de29bb2d1d..e9ea784b045ae 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/README.md +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/README.md @@ -0,0 +1,51 @@ +# LlamaIndex LLM Integration: Stepfun + +## Installation + +To install the required packages, run: + +```bash +%pip install llama-index-llms-stepfun +!pip install llama-index +``` + +## Setup + +### Initialize StepFun LLM + +First, import the necessary libraries and set up your `StepFun` instance. Replace `step-1v-8k`, and `TOKEN` with your model name, and API key, respectively: + +```python +import os +from typing import List, Optional +from llama_index.llms.stepfun import StepFun +from llama_index.core.llms import ChatMessage + +llm = StepFun( + api_key="TOKEN", + max_tokens=256, + context_window=4096, + model="step-1v-8k", +) +``` + +## Chat Functionality + +StepFun supports chat APIs, allowing you to handle conversation-like interactions. Here’s how to use it: + +```python +from llama_index.llms.stepfun import StepFun +from llama_index.core.llms import ChatMessage + +llm = StepFun( + api_key="", + max_tokens=256, + context_window=4096, + model="step-1v-8k", +) + + +message = ChatMessage(role="user", content="Tell me a joke") +resp = llm.chat([message]) +print(resp) +``` diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/tests/BUILD b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/BUILD index e69de29bb2d1d..dabf212d7e716 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/tests/BUILD +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/BUILD @@ -0,0 +1 @@ +python_tests() From 1f1d059bf78c2c8c36b27e4e14945df49374062b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Wed, 15 Jan 2025 11:15:38 +0000 Subject: [PATCH 4/6] feat: add model comment --- .../llama_index/llms/stepfun/base.py | 31 ++++++++++++++++++- .../llama-index-llms-stepfun/pyproject.toml | 4 +-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py index 250b22a325a16..f48704b82e380 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/base.py @@ -15,6 +15,19 @@ class StepFun(OpenAILike): + """ + The StepFun class is a subclass of OpenAILike and is used to interact with the StepFun model. + + Parameters: + model (str): The name of the Stepfun model to use. See https://platform.stepfun.com/docs/llm/modeloverview for options. + context_window (int): The maximum size of the context window for the model. See https://platform.stepfun.com/docs/llm/modeloverview for options. + is_chat_model (bool): Indicates whether the model is a chat model. + + Attributes: + model (str): The name of the Stepfun model to use. + context_window (int): The maximum size of the context window for the model. + is_chat_model (bool): Indicates whether the model is a chat model. + """ model: str = Field( description="The Stepfun model to use. See https://platform.stepfun.com/docs/llm/modeloverview for options." @@ -40,6 +53,22 @@ def __init__( api_key: Optional[str] = None, **kwargs: Any, ) -> None: + """ + Initialize the OpenAI API client. + + Args: + model (str): The name of the model to use. Defaults to DEFAULT_MODEL. + temperature (float): The temperature to use for the model. Defaults to DEFAULT_TEMPERATURE. + max_tokens (int): The maximum number of tokens to generate. Defaults to DEFAULT_NUM_OUTPUTS. + additional_kwargs (Optional[Dict[str, Any]]): Additional keyword arguments to pass to the model. Defaults to None. + max_retries (int): The maximum number of retries to make when calling the API. Defaults to 5. + api_base (Optional[str]): The base URL for the API. Defaults to DEFAULT_API_BASE. + api_key (Optional[str]): The API key to use. Defaults to None. + **kwargs (Any): Additional keyword arguments to pass to the model. + + Returns: + None + """ additional_kwargs = additional_kwargs or {} api_base = get_from_param_or_env("api_base", api_base, "STEPFUN_API_BASE") @@ -58,4 +87,4 @@ def __init__( @classmethod def class_name(cls) -> str: - return "Stpefun_LLM" \ No newline at end of file + return "Stpefun_LLM" diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml index 648b8ff0d6da5..597d0b6ef9a6b 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-llms-stepfun" readme = "README.md" -version = "0.3.1" +version = "0.3.2" [tool.poetry.dependencies] python = ">=3.9,<4.0" @@ -60,4 +60,4 @@ extras = ["toml"] version = ">=v2.2.6" [[tool.poetry.packages]] -include = "llama_index/" \ No newline at end of file +include = "llama_index/" From 73e1f94b6f7102cd6898ca0f938590235bb35cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Thu, 16 Jan 2025 11:21:38 +0000 Subject: [PATCH 5/6] fix: fix line with newline at the end of file --- docs/docs/api_reference/llms/stepfun.md | 2 +- .../llms/llama-index-llms-stepfun/.gitignore | 2 +- llama-index-integrations/llms/llama-index-llms-stepfun/BUILD | 2 +- llama-index-integrations/llms/llama-index-llms-stepfun/Makefile | 2 +- .../llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD | 2 +- .../llama_index/llms/stepfun/__init__.py | 2 +- .../llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/docs/api_reference/llms/stepfun.md b/docs/docs/api_reference/llms/stepfun.md index 75bd91c5494fd..ca2eb8029223c 100644 --- a/docs/docs/api_reference/llms/stepfun.md +++ b/docs/docs/api_reference/llms/stepfun.md @@ -1,4 +1,4 @@ ::: llama_index.llms.stepfun options: members: - - StepFun \ No newline at end of file + - StepFun diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore b/llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore index 78041dee26261..990c18de22908 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/.gitignore @@ -150,4 +150,4 @@ Pipfile Pipfile.lock # pyright -pyrightconfig.json \ No newline at end of file +pyrightconfig.json diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/BUILD b/llama-index-integrations/llms/llama-index-llms-stepfun/BUILD index 62294dc8415d0..0896ca890d8bf 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/BUILD +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/BUILD @@ -1,3 +1,3 @@ poetry_requirements( name="poetry", -) \ No newline at end of file +) diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/Makefile b/llama-index-integrations/llms/llama-index-llms-stepfun/Makefile index 40ef979652077..b9eab05aa3706 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/Makefile +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/Makefile @@ -14,4 +14,4 @@ test: ## Run tests via pytest. pytest tests watch-docs: ## Build and watch documentation. - sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(GIT_ROOT)/llama_index/ \ No newline at end of file + sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(GIT_ROOT)/llama_index/ diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD index 2181f04b38f79..db46e8d6c978c 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/BUILD @@ -1 +1 @@ -python_sources() \ No newline at end of file +python_sources() diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py index a5e81ddfe8242..962db2bd94a2c 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/llama_index/llms/stepfun/__init__.py @@ -1,3 +1,3 @@ from llama_index.llms.stepfun.base import StepFun -__all__ = ["StepFun"] \ No newline at end of file +__all__ = ["StepFun"] diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py index 532fbd166a016..ca2c19188c675 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/tests/test_llms_stepfun.py @@ -4,4 +4,4 @@ def test_text_inference_embedding_class(): names_of_base_classes = [b.__name__ for b in StepFun.__mro__] - assert BaseLLM.__name__ in names_of_base_classes \ No newline at end of file + assert BaseLLM.__name__ in names_of_base_classes From 717bc112120d57f804b741932620cc9ace90d7d8 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Thu, 16 Jan 2025 18:37:21 +0100 Subject: [PATCH 6/6] Apply suggestions from code review --- .../llms/llama-index-llms-stepfun/pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml index 597d0b6ef9a6b..bc42f65afce0e 100644 --- a/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml +++ b/llama-index-integrations/llms/llama-index-llms-stepfun/pyproject.toml @@ -18,7 +18,7 @@ StepFun = "llama-index" disallow_untyped_defs = true exclude = ["_static", "build", "examples", "notebooks", "venv"] ignore_missing_imports = true -python_version = "3.8" +python_version = "3.9" [tool.poetry] authors = ["Bestony "] @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-llms-stepfun" readme = "README.md" -version = "0.3.2" +version = "0.1.0" [tool.poetry.dependencies] python = ">=3.9,<4.0"