Skip to content

Commit

Permalink
chore: update dependency, bump version (#58)
Browse files Browse the repository at this point in the history
* chore: remove langchain dependency, bump version

* fix: ci, and update readme

* feat: openai optional dependency
  • Loading branch information
yuanbohan authored Nov 14, 2023
1 parent 8fb3d4f commit 68075a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
# TODO(yuanbohan): code coverage with pytest-cov
- name: Test with pytest
run: |
pip install pytest
pip install pytest langchain tiktoken
pytest tests/
- name: Lint & Format with Ruff
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ pip install --upgrade greptimeai

## Usage

TODO(yuanbohan): make sure this link is correct!!

To get started, create a service by registering [greptimeai][greptimeai], and get:

- host
Expand All @@ -33,8 +31,9 @@ export GREPTIMEAI_TOKEN=''
#### LangChain

LangChain provides a callback system that allows you to hook into the various stages of your LLM
application. Import GreptimeCallbackHandler, which helps to collect metrics and traces to
GreptimeCloud.
application.
Assuming you're using LangChain to empower your Application, what you need to do is just initiate
GreptimeCallbackHandler as the following:

```python
from greptimeai.langchain.callback import GreptimeCallbackHandler
Expand All @@ -57,15 +56,15 @@ chain.run(number=2, callbacks=callbacks)
```

This example needs to be configured with your OpenAI account's private API key which is available on
our [developer platform][openai]. Set it as the `OPENAI_API_KEY` environment variable:
[openai platform][openai]. Set it as the `OPENAI_API_KEY` environment variable:

```bash
export OPENAI_API_KEY='sk-...'
```

#### OpenAI

TODO
Coming

[greptimeai]: https://console.greptime.cloud/ai
[greptimeai-cookbook]: https://github.com/GreptimeTeam/greptimeai-cookbook
Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
[project]
name = "greptimeai"
version = "0.1.7"
version = "0.1.8"
description = "Observability tool for LLM application"
authors = [
{ name = "Greptime", email = "[email protected]" },
]
dependencies = [
"langchain>=0.0.285",
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
"opentelemetry-exporter-otlp-proto-http>=1.20.0",
"tiktoken>=0.5.1",
]
keywords = [
"greptime",
Expand All @@ -23,6 +21,9 @@ keywords = [
readme = "README.md"
requires-python = ">= 3.8"

[project.optional-dependencies]
openai = ["tiktoken>=0.5.1"]

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
Expand All @@ -32,6 +33,8 @@ managed = true
dev-dependencies = [
"ruff>=0.1.3",
"pytest>=7.4.3",
"langchain>=0.0.27",
"tiktoken>=0.5.1",
]

[tool.rye.scripts]
Expand Down
28 changes: 0 additions & 28 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,50 +7,22 @@
# all-features: false

-e file:.
aiohttp==3.8.6
aiosignal==1.3.1
annotated-types==0.6.0
anyio==3.7.1
async-timeout==4.0.3
attrs==23.1.0
backoff==2.2.1
certifi==2023.7.22
charset-normalizer==3.3.1
dataclasses-json==0.6.1
deprecated==1.2.14
exceptiongroup==1.1.3
frozenlist==1.4.0
googleapis-common-protos==1.61.0
idna==3.4
importlib-metadata==6.8.0
jsonpatch==1.33
jsonpointer==2.4
langchain==0.0.325
langsmith==0.0.53
marshmallow==3.20.1
multidict==6.0.4
mypy-extensions==1.0.0
numpy==1.24.4
opentelemetry-api==1.20.0
opentelemetry-exporter-otlp-proto-common==1.20.0
opentelemetry-exporter-otlp-proto-http==1.20.0
opentelemetry-proto==1.20.0
opentelemetry-sdk==1.20.0
opentelemetry-semantic-conventions==0.41b0
packaging==23.2
protobuf==4.24.4
pydantic==2.4.2
pydantic-core==2.10.1
pyyaml==6.0.1
regex==2023.10.3
requests==2.31.0
sniffio==1.3.0
sqlalchemy==2.0.22
tenacity==8.2.3
tiktoken==0.5.1
typing-extensions==4.8.0
typing-inspect==0.9.0
urllib3==2.0.7
wrapt==1.15.0
yarl==1.9.2
zipp==3.17.0

0 comments on commit 68075a6

Please sign in to comment.