Together AI
TogetherClient
Bases: BatchClient
Source code in dactyl_generation/together_generation.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
__init__(api_key)
Constructor for Together AI client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
API key |
required |
Source code in dactyl_generation/together_generation.py
10 11 12 13 14 15 16 17 18 | |
create_batch_job(jsonl_path)
Creates batch job from JSONL file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
jsonl_path
|
str
|
Path to JSONL file. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
batch_job_input |
Dict[str, str]
|
Dictionary of batch job information. |
Source code in dactyl_generation/together_generation.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
get_batch_job_output(batch_job_file)
Retrieves batch job output.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch_job_file
|
str
|
Path to batch job input, generated from the function |
required |
Returns: result_df: Pandas DataFrame of batch job output.
Source code in dactyl_generation/together_generation.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |