Runs - Get
- TypeScript
- Python
Get run data for a given run ID with getRun()
.
Get run data for a given run ID with get_run()
.
Example
typescript
import {init ,getRun } from "@gentrace/core";async functionmain () {init ({apiKey :process .env .GENTRACE_API_KEY ?? "",});// example runIDconstrunID = "5615b021-03cd-4cd9-9bc8-6a2f7bf4240e";construnData = awaitgetRun (runID );console .log (runData );console .log (runData .stepRuns [0].inputs );console .log (runData .stepRuns [0].outputs );}main ();
python
import gentraceimport osfrom dotenv import load_dotenvload_dotenv()def main():gentrace.init(api_key=os.getenv("GENTRACE_API_KEY"),)# example runIDrun_id = "5615b021-03cd-4cd9-9bc8-6a2f7bf4240e"run_data = gentrace.get_run(run_id)print(run_data)print(run_data["stepRuns"][0]["inputs"])print(run_data["stepRuns"][0]["outputs"])main()
Arguments
Return value
Returns Run
.
Learn about the typing of the return value on this API page.