No project description provided
Project description
together-worker
Example
cat examples/echo.py
from together_worker.fast_inference import FastInferenceInterface
class Echo(FastInferenceInterface):
def setup(self, args):
self.message = " to you too."
def dispatch_request(self, args, env):
prompt = args[0]["prompt"]
return {
"choices": [ { "text": prompt + self.message } ],
}
Test with local REST server
pip install --upgrade together-worker
together-worker examples.echo Echo
curl -X POST http://127.0.0.1:5001/ -d '{ "prompt": "test123" }'
{"choices": [{"text": "test123 to you too."}]}
Setup dev
make install
Publish to PyPi
GitHub repo > Releases > Draft a new Release > Choose a tag > Create new tag on publish >
Name the tag using the current version from pyproject.toml with a "v" e.g. v1.0.9
.
Publish Release
In the repo toolbar select > Actions
- Verify the publish workflow is running and completes successfully
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
together_worker-0.1.21.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for together_worker-0.1.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12bf1092a540e7fe8a14426f62befd524a35be5a084fb944014a9583537ed045 |
|
MD5 | b4739bfd22ba1f9ea345efca6e6d2507 |
|
BLAKE2b-256 | a61c299e69723cd422a64630de9aa891447ea7bbe05b16d1a2ce8d897ebf1578 |