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
python -m together_worker.serving 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.22.tar.gz
(8.4 kB
view hashes)
Built Distribution
Close
Hashes for together_worker-0.1.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f37d058968e90a6f66d283f32706cab21c2e8b904b27da5a49c32202865d2606 |
|
MD5 | e4eec3368bd7c0ae3245c0c59dcee8d1 |
|
BLAKE2b-256 | feb8fb82a7cbe4c94aad93de205cfc34ca3c107b021af0a9564e41c61725de23 |