https://github.com/johanste/chatter
Experiment for chat client API patterns
https://github.com/johanste/chatter
Last synced: 10 months ago
JSON representation
Experiment for chat client API patterns
- Host: GitHub
- URL: https://github.com/johanste/chatter
- Owner: johanste
- Created: 2024-02-11T22:03:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-11T22:14:30.000Z (over 2 years ago)
- Last Synced: 2025-01-16T14:30:13.078Z (over 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Experiments with chat and tracing
Try out the experience with various API patterns for clients.
Example usage(s):
```python
import chatter
import chatter.llama
import chatter.openai
client = chatter.openai.ParametersOpenAIClient(endpoint='zzz://openai.com',
credentials="dummy",
defaults={"temperature": 0.5})
completion = client.complete(
messages = [chatter.Message("hello")],
model="gpt-4",
parameters = chatter.openai.OpenAIChatParameters(logprobs=True)
)
llamaclient = chatter.llama.ParametersLlamaClient(endpoint='zzz://llama.com', credentials="dummytoken")
llamaclient.complete([], "", parameters = { "seed": "123" })
```
## Setup
pip install git+https://git@github.com/johanste/chatter#egg=chatter