{"openapi":"3.1.0","info":{"title":"Talc data generation API","version":"0.1.26"},"paths":{"/kb/list":{"get":{"summary":"List Knowledge Bases","description":"Gets a list of all datasets.","operationId":"list_knowledge_bases_kb_list_get","parameters":[{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBase"},"title":"Response List Knowledge Bases Kb List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/kb/list":{"get":{"summary":"List Knowledge Bases","description":"Gets a list of all datasets.","operationId":"list_knowledge_bases_evals_kb_list_get","deprecated":true,"parameters":[{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KnowledgeBase"},"title":"Response List Knowledge Bases Evals Kb List Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dataset/generate/{job_id}":{"get":{"summary":"Get Dataset Creation Job","description":"Get the status of a dataset creation job.","operationId":"get_dataset_creation_job_dataset_generate__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreationJob"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/dataset/generate/{job_id}":{"get":{"summary":"Get Dataset Creation Job","description":"Get the status of a dataset creation job.","operationId":"get_dataset_creation_job_evals_dataset_generate__job_id__get","deprecated":true,"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreationJob"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dataset/jobstatus/{dataset_id}/":{"get":{"summary":"Get Job By Dataset","description":"Get the status of a dataset creation job.","operationId":"get_job_by_dataset_dataset_jobstatus__dataset_id___get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreationJob"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dataset/recent":{"get":{"summary":"Get Recent Datasets","description":"Get the status of a dataset creation job.","operationId":"get_recent_datasets_dataset_recent_get","parameters":[{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetCreationJob"},"title":"Response Get Recent Datasets Dataset Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dataset/generate/":{"post":{"summary":"Generate Dataset","description":"Create a new dataset and save it to the database.","operationId":"generate_dataset_dataset_generate__post","parameters":[{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionGenerationConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreationJob"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/dataset/generate/":{"post":{"summary":"Generate Dataset","description":"Create a new dataset and save it to the database.","operationId":"generate_dataset_evals_dataset_generate__post","deprecated":true,"parameters":[{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionGenerationConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreationJob"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dataset/{dataset_id}":{"get":{"summary":"Get Dataset","description":"Gets a dataset by its ID.","operationId":"get_dataset_dataset__dataset_id__get","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TestCaseWithRubric"},"title":"Response Get Dataset Dataset  Dataset Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/dataset/{dataset_id}":{"get":{"summary":"Get Dataset","description":"Gets a dataset by its ID.","operationId":"get_dataset_evals_dataset__dataset_id__get","deprecated":true,"parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TestCaseWithRubric"},"title":"Response Get Dataset Evals Dataset  Dataset Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/kb/create/{friendly_name}":{"post":{"summary":"Upload Kb","description":"Upload documents to create a knowledge base.\nThe resulting knowledge base can be used to create multiple datasets\nEnsure that the database and storage are kept in sync.\nInclude try/except blocks where necessary and if a document fails to upload to one place, delete it from the other.","operationId":"upload_kb_kb_create__friendly_name__post","parameters":[{"name":"friendly_name","in":"path","required":true,"schema":{"type":"string","title":"Friendly Name"}},{"name":"verify","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Verify"}},{"name":"auto_link","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Auto Link"}},{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_kb_kb_create__friendly_name__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evals/kb/create/{friendly_name}":{"post":{"summary":"Upload Kb","description":"Upload documents to create a knowledge base.\nThe resulting knowledge base can be used to create multiple datasets\nEnsure that the database and storage are kept in sync.\nInclude try/except blocks where necessary and if a document fails to upload to one place, delete it from the other.","operationId":"upload_kb_evals_kb_create__friendly_name__post","deprecated":true,"parameters":[{"name":"friendly_name","in":"path","required":true,"schema":{"type":"string","title":"Friendly Name"}},{"name":"verify","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Verify"}},{"name":"auto_link","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Auto Link"}},{"name":"x-talc-api","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Talc-Api"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_kb_evals_kb_create__friendly_name__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_upload_kb_evals_kb_create__friendly_name__post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_kb_evals_kb_create__friendly_name__post"},"Body_upload_kb_kb_create__friendly_name__post":{"properties":{"files":{"items":{"type":"string","format":"binary"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_upload_kb_kb_create__friendly_name__post"},"DatasetCreationJob":{"properties":{"id":{"type":"string","title":"Id"},"dataset_id":{"type":"string","title":"Dataset Id"},"last_updated":{"type":"string","format":"date-time","title":"Last Updated"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"diagnostics":{"title":"Diagnostics"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","dataset_id","last_updated","status","error","diagnostics"],"title":"DatasetCreationJob","description":"Represents the status for a long-running job that creates a dataset in the DB."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HallucinationInducingQuestionGeneratorArgs":{"properties":{"question_limit":{"type":"integer","title":"Question Limit","description":"The number of questions to generate"},"question_type":{"type":"string","enum":["HallucinationInducing"],"const":"HallucinationInducing","title":"Question Type","default":"HallucinationInducing"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"The temperature to use when generating questions"},"positive_examples":{"items":{"$ref":"#/components/schemas/QuestionWithReason"},"type":"array","title":"Positive Examples","description":"A list of few-shot examples of good questions to help guide the question generation"},"negative_examples":{"items":{"$ref":"#/components/schemas/QuestionWithReason"},"type":"array","title":"Negative Examples","description":"A list of few-shot examples of poorly phrased or incorrect questions to help guide the question generation","default":[]},"extra_criteria":{"items":{"type":"string"},"type":"array","title":"Extra Criteria","description":"A list of extra criteria to evaluate the quality of the generated questions.","default":[]}},"type":"object","required":["question_limit","positive_examples"],"title":"HallucinationInducingQuestionGeneratorArgs"},"KnowledgeBase":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"friendly_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Friendly Name"},"documents":{"items":{"type":"string"},"type":"array","title":"Documents","default":[]},"errors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Errors"}},"type":"object","title":"KnowledgeBase","description":"A collection of documents, with relationships between them."},"LinkedTopicQuestionGeneratorArgs":{"properties":{"question_limit":{"type":"integer","title":"Question Limit","description":"The number of questions to generate"},"question_type":{"type":"string","enum":["LinkedTopic"],"const":"LinkedTopic","title":"Question Type","default":"LinkedTopic"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"The temperature to use when generating questions"},"positive_examples":{"items":{"$ref":"#/components/schemas/QuestionWithReason"},"type":"array","title":"Positive Examples","description":"A list of few-shot examples of good questions to help guide the question generation"},"negative_examples":{"items":{"$ref":"#/components/schemas/QuestionWithReason"},"type":"array","title":"Negative Examples","description":"A list of few-shot examples of poorly phrased or incorrect questions to help guide the question generation","default":[]},"extra_criteria":{"items":{"type":"string"},"type":"array","title":"Extra Criteria","description":"A list of extra criteria to evaluate the quality of the generated questions.","default":[]}},"type":"object","required":["question_limit","positive_examples"],"title":"LinkedTopicQuestionGeneratorArgs"},"QuestionGenerationConfig":{"properties":{"name":{"type":"string","title":"Name","description":"Friendly name for the configuration used in logging, error reporting and the UI."},"knowledge_bases":{"items":{"type":"string"},"type":"array","title":"Knowledge Bases","description":"List of knowledge bases to use for generating questions. Uses knowledge base UUIDs."},"question_configs":{"items":{"oneOf":[{"$ref":"#/components/schemas/SimpleQuestionGeneratorArgs"},{"$ref":"#/components/schemas/HallucinationInducingQuestionGeneratorArgs"},{"$ref":"#/components/schemas/LinkedTopicQuestionGeneratorArgs"}],"discriminator":{"propertyName":"question_type","mapping":{"HallucinationInducing":"#/components/schemas/HallucinationInducingQuestionGeneratorArgs","LinkedTopic":"#/components/schemas/LinkedTopicQuestionGeneratorArgs","SimpleQuestion":"#/components/schemas/SimpleQuestionGeneratorArgs"}}},"type":"array","title":"Question Configs","description":"List of question generator configurations."}},"type":"object","required":["name","knowledge_bases","question_configs"],"title":"QuestionGenerationConfig"},"QuestionWithReason":{"properties":{"reason":{"type":"string","title":"Reason","description":"Used for explaining the reasoning behind the question.","default":"<Placeholder for reasoning>"},"question":{"type":"string","title":"Question","description":"The question text."},"reference_answer":{"type":"string","title":"Reference Answer","description":"The expected response."}},"type":"object","required":["question","reference_answer"],"title":"QuestionWithReason"},"SimpleQuestionGeneratorArgs":{"properties":{"question_limit":{"type":"integer","title":"Question Limit","description":"The number of questions to generate"},"question_type":{"type":"string","enum":["SimpleQuestion"],"const":"SimpleQuestion","title":"Question Type","default":"SimpleQuestion"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"The temperature to use when generating questions"},"positive_examples":{"items":{"$ref":"#/components/schemas/QuestionWithReason"},"type":"array","title":"Positive Examples","description":"A list of few-shot examples of good questions to help guide the question generation"},"negative_examples":{"items":{"$ref":"#/components/schemas/QuestionWithReason"},"type":"array","title":"Negative Examples","description":"A list of few-shot examples of poorly phrased or incorrect questions to help guide the question generation","default":[]},"extra_criteria":{"items":{"type":"string"},"type":"array","title":"Extra Criteria","description":"A list of extra criteria to evaluate the quality of the generated questions.","default":[]}},"type":"object","required":["question_limit","positive_examples"],"title":"SimpleQuestionGeneratorArgs"},"TestCaseWithRubric":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"question":{"type":"string","title":"Question"},"expected_response":{"type":"string","title":"Expected Response"},"scenario_data":{"type":"object","title":"Scenario Data"},"source_content":{"items":{"type":"string"},"type":"array","title":"Source Content"}},"type":"object","required":["id","question","expected_response","scenario_data","source_content"],"title":"TestCaseWithRubric","description":"Represents a single test case that should be run."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}