llm-venice 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llm_venice-0.0.0/PKG-INFO +68 -0
- llm_venice-0.0.0/README.md +52 -0
- llm_venice-0.0.0/llm_venice.egg-info/PKG-INFO +68 -0
- llm_venice-0.0.0/llm_venice.egg-info/SOURCES.txt +10 -0
- llm_venice-0.0.0/llm_venice.egg-info/dependency_links.txt +1 -0
- llm_venice-0.0.0/llm_venice.egg-info/entry_points.txt +2 -0
- llm_venice-0.0.0/llm_venice.egg-info/requires.txt +4 -0
- llm_venice-0.0.0/llm_venice.egg-info/top_level.txt +1 -0
- llm_venice-0.0.0/llm_venice.py +35 -0
- llm_venice-0.0.0/pyproject.toml +25 -0
- llm_venice-0.0.0/setup.cfg +4 -0
- llm_venice-0.0.0/tests/test_venice.py +6 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: llm-venice
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: LLM plugin to access Venice.AI-hosted models
|
|
5
|
+
Author: Arjan Mossel
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/ar-jan/llm-venice
|
|
8
|
+
Project-URL: Changelog, https://github.com/ar-jan/llm-venice/releases
|
|
9
|
+
Project-URL: Issues, https://github.com/ar-jan/llm-venice/issues
|
|
10
|
+
Project-URL: CI, https://github.com/ar-jan/llm-venice/actions
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: llm
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: pytest; extra == "test"
|
|
16
|
+
|
|
17
|
+
# llm-venice
|
|
18
|
+
|
|
19
|
+
[LLM](https://llm.datasette.io/) plugin to access [Venice AI](https://venice.ai/) models.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
Install the [LLM command-line utility](https://llm.datasette.io/en/stable/setup.html), and install this plugin in the same environment as `llm`.
|
|
25
|
+
|
|
26
|
+
`llm install llm-venice`
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Configuration
|
|
30
|
+
|
|
31
|
+
Set an environment variable `LLM_VENICE_KEY`, or save a Venice API key to `llm`'s keys:
|
|
32
|
+
|
|
33
|
+
`llm keys set venice`
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
Run a prompt:
|
|
39
|
+
|
|
40
|
+
`llm --model venice/nous-theta-8b "Why is the earth round?"`
|
|
41
|
+
|
|
42
|
+
Start an interactive chat session:
|
|
43
|
+
|
|
44
|
+
`llm chat --model venice/llama-3.1-405b`
|
|
45
|
+
|
|
46
|
+
Read the [docs](https://llm.datasette.io/en/stable/usage.html) for more `llm` usage options.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Development
|
|
50
|
+
|
|
51
|
+
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd llm-venice
|
|
55
|
+
python3 -m venv venv
|
|
56
|
+
source venv/bin/activate
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Install the dependencies and test dependencies:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
llm install -e '.[test]'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To run the tests:
|
|
66
|
+
```bash
|
|
67
|
+
pytest
|
|
68
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# llm-venice
|
|
2
|
+
|
|
3
|
+
[LLM](https://llm.datasette.io/) plugin to access [Venice AI](https://venice.ai/) models.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Install the [LLM command-line utility](https://llm.datasette.io/en/stable/setup.html), and install this plugin in the same environment as `llm`.
|
|
9
|
+
|
|
10
|
+
`llm install llm-venice`
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Configuration
|
|
14
|
+
|
|
15
|
+
Set an environment variable `LLM_VENICE_KEY`, or save a Venice API key to `llm`'s keys:
|
|
16
|
+
|
|
17
|
+
`llm keys set venice`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
Run a prompt:
|
|
23
|
+
|
|
24
|
+
`llm --model venice/nous-theta-8b "Why is the earth round?"`
|
|
25
|
+
|
|
26
|
+
Start an interactive chat session:
|
|
27
|
+
|
|
28
|
+
`llm chat --model venice/llama-3.1-405b`
|
|
29
|
+
|
|
30
|
+
Read the [docs](https://llm.datasette.io/en/stable/usage.html) for more `llm` usage options.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Development
|
|
34
|
+
|
|
35
|
+
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd llm-venice
|
|
39
|
+
python3 -m venv venv
|
|
40
|
+
source venv/bin/activate
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Install the dependencies and test dependencies:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
llm install -e '.[test]'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
To run the tests:
|
|
50
|
+
```bash
|
|
51
|
+
pytest
|
|
52
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: llm-venice
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: LLM plugin to access Venice.AI-hosted models
|
|
5
|
+
Author: Arjan Mossel
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/ar-jan/llm-venice
|
|
8
|
+
Project-URL: Changelog, https://github.com/ar-jan/llm-venice/releases
|
|
9
|
+
Project-URL: Issues, https://github.com/ar-jan/llm-venice/issues
|
|
10
|
+
Project-URL: CI, https://github.com/ar-jan/llm-venice/actions
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: llm
|
|
14
|
+
Provides-Extra: test
|
|
15
|
+
Requires-Dist: pytest; extra == "test"
|
|
16
|
+
|
|
17
|
+
# llm-venice
|
|
18
|
+
|
|
19
|
+
[LLM](https://llm.datasette.io/) plugin to access [Venice AI](https://venice.ai/) models.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
Install the [LLM command-line utility](https://llm.datasette.io/en/stable/setup.html), and install this plugin in the same environment as `llm`.
|
|
25
|
+
|
|
26
|
+
`llm install llm-venice`
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Configuration
|
|
30
|
+
|
|
31
|
+
Set an environment variable `LLM_VENICE_KEY`, or save a Venice API key to `llm`'s keys:
|
|
32
|
+
|
|
33
|
+
`llm keys set venice`
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
Run a prompt:
|
|
39
|
+
|
|
40
|
+
`llm --model venice/nous-theta-8b "Why is the earth round?"`
|
|
41
|
+
|
|
42
|
+
Start an interactive chat session:
|
|
43
|
+
|
|
44
|
+
`llm chat --model venice/llama-3.1-405b`
|
|
45
|
+
|
|
46
|
+
Read the [docs](https://llm.datasette.io/en/stable/usage.html) for more `llm` usage options.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Development
|
|
50
|
+
|
|
51
|
+
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd llm-venice
|
|
55
|
+
python3 -m venv venv
|
|
56
|
+
source venv/bin/activate
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Install the dependencies and test dependencies:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
llm install -e '.[test]'
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To run the tests:
|
|
66
|
+
```bash
|
|
67
|
+
pytest
|
|
68
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
llm_venice.py
|
|
3
|
+
pyproject.toml
|
|
4
|
+
llm_venice.egg-info/PKG-INFO
|
|
5
|
+
llm_venice.egg-info/SOURCES.txt
|
|
6
|
+
llm_venice.egg-info/dependency_links.txt
|
|
7
|
+
llm_venice.egg-info/entry_points.txt
|
|
8
|
+
llm_venice.egg-info/requires.txt
|
|
9
|
+
llm_venice.egg-info/top_level.txt
|
|
10
|
+
tests/test_venice.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
llm_venice
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import llm
|
|
2
|
+
from llm.default_plugins.openai_models import Chat
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
MODELS = (
|
|
6
|
+
"dolphin-2.9.2-qwen2-72b",
|
|
7
|
+
"llama-3.1-405b",
|
|
8
|
+
"llama-3.2-3b",
|
|
9
|
+
"nous-theta-8b",
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class VeniceChat(Chat):
|
|
14
|
+
needs_key = "venice"
|
|
15
|
+
key_env_var = "LLM_VENICE_KEY"
|
|
16
|
+
|
|
17
|
+
def __str__(self):
|
|
18
|
+
return f"Venice Chat: {self.model_id}"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@llm.hookimpl
|
|
22
|
+
def register_models(register):
|
|
23
|
+
key = llm.get_key("", "venice", "LLM_VENICE_KEY")
|
|
24
|
+
if not key:
|
|
25
|
+
return
|
|
26
|
+
|
|
27
|
+
for model_id in MODELS:
|
|
28
|
+
register(
|
|
29
|
+
VeniceChat(
|
|
30
|
+
model_id=f"venice/{model_id}",
|
|
31
|
+
model_name=model_id,
|
|
32
|
+
api_base="https://api.venice.ai/api/v1",
|
|
33
|
+
can_stream=False
|
|
34
|
+
)
|
|
35
|
+
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "llm-venice"
|
|
3
|
+
version = "0.0.0"
|
|
4
|
+
description = "LLM plugin to access Venice.AI-hosted models"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [{name = "Arjan Mossel"}]
|
|
7
|
+
license = {text = "Apache-2.0"}
|
|
8
|
+
classifiers = [
|
|
9
|
+
"License :: OSI Approved :: Apache Software License"
|
|
10
|
+
]
|
|
11
|
+
dependencies = [
|
|
12
|
+
"llm",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.urls]
|
|
16
|
+
Homepage = "https://github.com/ar-jan/llm-venice"
|
|
17
|
+
Changelog = "https://github.com/ar-jan/llm-venice/releases"
|
|
18
|
+
Issues = "https://github.com/ar-jan/llm-venice/issues"
|
|
19
|
+
CI = "https://github.com/ar-jan/llm-venice/actions"
|
|
20
|
+
|
|
21
|
+
[project.entry-points.llm]
|
|
22
|
+
venice = "llm_venice"
|
|
23
|
+
|
|
24
|
+
[project.optional-dependencies]
|
|
25
|
+
test = ["pytest"]
|