diff --git a/openapi.yaml b/openapi.yaml index 1c464e2..0eeef91 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -30,8 +30,9 @@ paths: $ref: '#/components/schemas/ListVoicesResponse' x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -42,8 +43,8 @@ paths: response = client.audio.voices.list() print(response.data) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -89,8 +90,9 @@ paths: operationId: retrieveVideo x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -101,8 +103,8 @@ paths: response = client.videos.retrieve(video_id) print(response.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -166,8 +168,9 @@ paths: - url: https://api.together.xyz/v2 x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -181,8 +184,8 @@ paths: ) print(response.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -246,8 +249,9 @@ paths: description: Query a chat model. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -264,8 +268,8 @@ paths: ) print(response.choices[0].message.content) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -390,8 +394,9 @@ paths: description: Query a language, code, or image model. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -406,8 +411,8 @@ paths: ) print(response.choices[0].text) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -526,8 +531,9 @@ paths: description: Query an embedding model for a given string of text. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -541,8 +547,8 @@ paths: ) print(response.data[0].embedding) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -654,8 +660,9 @@ paths: description: Lists all of Together's open-source models x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -667,8 +674,8 @@ paths: for model in models: print(model.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -760,8 +767,9 @@ paths: description: Upload a custom model or adapter from Hugging Face or S3 x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -775,8 +783,8 @@ paths: ) print(response.job_id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -889,8 +897,9 @@ paths: description: Use an image model to generate an image for a given prompt. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -905,8 +914,8 @@ paths: ) print(response.data[0].url) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1062,8 +1071,9 @@ paths: description: List the metadata for all uploaded data files. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1075,8 +1085,8 @@ paths: for file in response.data: print(file.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1137,8 +1147,9 @@ paths: description: List the metadata for a single uploaded data file. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1149,8 +1160,8 @@ paths: file = client.files.retrieve(id="file-id") print(file) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1211,8 +1222,9 @@ paths: description: Delete a previously uploaded data file. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1223,8 +1235,8 @@ paths: response = client.files.delete(id="file-id") print(response) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1285,8 +1297,9 @@ paths: description: Get the contents of a single uploaded data file. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1297,8 +1310,8 @@ paths: file = client.files.retrieve_content(id="file-id") print(file.filename) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1368,8 +1381,9 @@ paths: description: Upload a file with specified purpose, file name, and file type. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1382,8 +1396,8 @@ paths: file = client.files.upload(file=file_path) print(file.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1486,8 +1500,9 @@ paths: description: Create a fine-tuning job with the provided model and training data. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1501,8 +1516,8 @@ paths: ) print(response) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1685,8 +1700,9 @@ paths: description: List the metadata for all fine-tuning jobs. Returns a list of FinetuneResponseTruncated objects. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1698,8 +1714,8 @@ paths: for fine_tune in response.data: print(f"ID: {fine_tune.id}, Status: {fine_tune.status}") - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1760,8 +1776,9 @@ paths: description: List the metadata for a single fine-tuning job. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1772,8 +1789,8 @@ paths: fine_tune = client.fine_tuning.retrieve(id="ft-id") print(fine_tune) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1834,8 +1851,9 @@ paths: description: Delete a fine-tuning job. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1846,8 +1864,8 @@ paths: response = client.fine_tuning.delete(id="ft-id") print(response) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -1926,8 +1944,9 @@ paths: description: List the events for a single fine-tuning job. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -1938,8 +1957,8 @@ paths: events = client.fine_tuning.list_events(id="ft-id") print(events) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -2002,8 +2021,9 @@ paths: description: List the checkpoints for a single fine-tuning job. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -2014,8 +2034,8 @@ paths: checkpoints = client.fine_tuning.list_checkpoints(id="ft-id") print(checkpoints) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -2077,8 +2097,9 @@ paths: description: Receive a compressed fine-tuned model or checkpoint. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -2090,8 +2111,8 @@ paths: response = client.fine_tuning.download(id="ft-id") print(response) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -2182,8 +2203,9 @@ paths: description: Cancel a currently running fine-tuning job. Returns a FinetuneResponseTruncated object. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -2194,8 +2216,8 @@ paths: response = client.fine_tuning.cancel(id="ft-id") print(response) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -2262,8 +2284,9 @@ paths: description: Query a reranker model x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -2300,8 +2323,8 @@ paths: print(f"Rank: {result.index + 1}") print(f"Title: {documents[result.index]['title']}") print(f"Text: {documents[result.index]['text']}") - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -2496,8 +2519,9 @@ paths: description: Generate audio from input text x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -2512,8 +2536,8 @@ paths: ) response.stream_to_file("audio.wav") - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -2941,8 +2965,9 @@ paths: description: Transcribes audio into text x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together client = Together( @@ -2957,8 +2982,8 @@ paths: ) print(response.text) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together @@ -3062,8 +3087,9 @@ paths: description: Translates audio into English x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3080,8 +3106,8 @@ paths: ) print(response.text) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -3197,8 +3223,8 @@ paths: schema: $ref: '#/components/schemas/ListAvailibilityZonesResponse' x-codeSamples: - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -3247,8 +3273,9 @@ paths: description: Returns a list of all endpoints associated with your account. You can filter the results by type (dedicated or serverless). x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3260,8 +3287,8 @@ paths: for endpoint in endpoints: print(endpoint.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -3384,8 +3411,9 @@ paths: description: Creates a new dedicated endpoint for serving models. The endpoint will automatically start after creation. You can deploy any supported model on hardware configurations that meet the model's requirements. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3401,8 +3429,8 @@ paths: ) print(endpoint.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -3507,8 +3535,9 @@ paths: description: Retrieves details about a specific endpoint, including its current state, configuration, and scaling settings. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3519,8 +3548,8 @@ paths: endpoint = client.endpoints.get("endpoint-id") print(endpoint.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -3603,8 +3632,9 @@ paths: description: Updates an existing endpoint's configuration. You can modify the display name, autoscaling settings, or change the endpoint's state (start/stop). x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3722,8 +3752,9 @@ paths: description: Permanently deletes an endpoint. This action cannot be undone. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3806,8 +3837,9 @@ paths: with that model, including their current availability status. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3819,8 +3851,8 @@ paths: for hardware in response: print(hardware.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -3914,8 +3946,9 @@ paths: between calls to the same session. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -3929,8 +3962,8 @@ paths: ) print(response.data.outputs[0].data); - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4009,11 +4042,12 @@ paths: Lists all your currently active sessions. x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ # together v1 does not support this method - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4076,8 +4110,9 @@ paths: description: List all batch jobs for the authenticated user x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4089,8 +4124,8 @@ paths: for batch in batches: print(batch.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4162,8 +4197,9 @@ paths: description: Create a new batch job with the given input file and endpoint x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4174,8 +4210,8 @@ paths: batch = client.batches.create_batch("file_id", endpoint="/v1/chat/completions") print(batch.id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4274,8 +4310,9 @@ paths: description: Get details of a batch job by ID x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4286,8 +4323,8 @@ paths: batch = client.batches.get_batch("batch_id") print(batch) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4383,8 +4420,9 @@ paths: description: Cancel a batch job by ID x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4395,8 +4433,8 @@ paths: batch = client.batches.cancel("batch_id") print(batch) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4493,8 +4531,9 @@ paths: operationId: createEvaluationJob x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4513,8 +4552,8 @@ paths: ) print(response.workflow_id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4623,8 +4662,9 @@ paths: operationId: getAllEvaluationJobs x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4636,8 +4676,8 @@ paths: for job in jobs: print(job.workflow_id) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4764,8 +4804,9 @@ paths: operationId: getEvaluationJobDetails x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4776,8 +4817,8 @@ paths: response = client.evaluation.retrieve('eval_id') print(response) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os @@ -4847,8 +4888,9 @@ paths: operationId: getEvaluationJobStatusAndResults x-codeSamples: - lang: Python - label: Together AI SDK (Python) + label: Together AI SDK (v1) source: | + # Docs for v2 can be found by changing the above selector ^ from together import Together import os @@ -4860,8 +4902,8 @@ paths: print(response.status) print(response.results) - - lang: Python v2 - label: Python v2 + - lang: Python + label: Together AI SDK (v2) source: | from together import Together import os