Registry / ai-ml / reka-api

reka-api

JSON →
library3.2.0pypypi✓ verified 82d ago

The official Python SDK for interacting with the Reka API, providing access to Reka's multimodal language models. Current version 3.2.0 supports Python >=3.8 and <4.0. Active development with monthly releases.

pip install reka-api
INSTALL
IMPORT
SIG · REKA-API
R
reka-api
ai-mlpythonv3.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChatMessage
from reka import ChatMessage
from reka import Reka
ChatResponse
from reka import ChatResponse
Model
from reka import Model

Initialize the Reka client and send a chat prompt.

import os from reka import Reka client = Reka(api_key=os.environ.get('REKA_API_KEY', 'YOUR_API_KEY')) response = client.chat( model="reka-core-20240501", messages=[ {"role": "user", "content": "Hello, Reka!"} ] ) print(response['message']['content'])
Debug
Known issues
breakingBetween v2.x and v3.x, the SDK replaced `reka.Reka` with `reka.Reka` (same class) but changed method signatures. `client.chat()` now expects a `messages` list of dicts with 'role' and 'content', not `prompt` string.
fix
Use `messages=[{'role': 'user', 'content': '...'}]` instead of `prompt='...'`.
affects: >=3.0.0
deprecatedThe `model` parameter in `chat()` defaults to `reka-core-20240501`. In future versions the default may change or become required.
fix
Always specify the model explicitly: `client.chat(model='...', messages=...)`.
affects: >=3.0.0
gotchaAPI keys must be passed explicitly via `api_key` parameter in the Reka constructor or set via `REKA_API_KEY` environment variable. The SDK does not read from other env variables or config files.
fix
Set `REKA_API_KEY` env var or pass `api_key` to Reka().
affects: all
Upgrade
Version history
3.2.0latest on PyPI · released Sep 30, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources

No resource links recorded.

reka-api — pip install reka-api · libregistry