Chemistry Companion · GPT-Aktionen
Chemistry Companion
This is an API for generating and returning molecule and reaction diagrams for use with custom GPTs.
POST /lookup_smiles/Lookup SMILES Code for a ChemicalEndpoint to retrieve the SMILES code for a given chemical name. Args: - chemical_name (str): The name of the chemical. Returns: - dict: A dictionary with the chemical name and its corresponding SMILES code.
POST /generate_diagram/Generate Molecule or Reaction DiagramGenerate a diagram of molecule(s) in SMILES. Args: - smiles (List[str]): A list of SMILES strs for molecule(s) - labels (List[str]): Corresponding label(s) - annotate_atoms (bool, optional): If True, annotate atoms. Defaults to False. Returns: - dict: A dict with the URL of generated image.
POST /generate_reaction_diagram/Generate Chemical Reaction DiagramGenerate a diagram for a chemical reaction specified in reaction SMARTS format. Args: - reaction_smarts (str): A string in reaction SMARTS format representing the chemical reaction. Returns: - dict: A dictionary with the URL of the generated reaction diagram image.
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "Chemistry Companion",
"description": "This is an API for generating and returning molecule and reaction diagrams for use with custom GPTs.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://cybrix.ai/chemistry_companion",
"description": "Chemistry Companion"
}
],
"paths": {
"/lookup_smiles/": {
"post": {
"summary": "Lookup SMILES Code for a Chemical",
"description": "Endpoint to retrieve the SMILES code for a given chemical name.\n\nArgs:\n- chemical_name (str): The name of the chemical.\n\nReturns:\n- dict: A dictionary with the chemical name and its corresponding SMILES code.",
"operationId": "lookup_smiles_lookup_smiles__post",
"parameters": [
{
"name": "chemical_name",
"in": "query",
"required": true,
"schema": {
"type": "string",
"title": "Chemical Name"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/generate_diagram/": {
"post": {
"summary": "Generate Molecule or Reaction Diagram",
"description": "Generate a diagram of molecule(s) in SMILES.\n\nArgs:\n- smiles (List[str]): A list of SMILES strs for molecule(s)\n- labels (List[str]): Corresponding label(s)\n- annotate_atoms (bool, optional): If True, annotate atoms. Defaults to False.\n\nReturns:\n- dict: A dict with the URL of generated image.",
"operationId": "generate_diagram_generate_diagram__post",
"parameters": [
{
"name": "annotate_atoms",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false,
"title": "Annotate Atoms"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_generate_diagram_generate_diagram__post"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/generate_reaction_diagram/": {
"post": {
"summary": "Generate Chemical Reaction Diagram",
"description": "Generate a diagram for a chemical reaction specified in reaction SMARTS format.\n\nArgs:\n- reaction_smarts (str): A string in reaction SMARTS format representing the chemical reaction.\n\nReturns:\n- dict: A dictionary with the URL of the generated reaction diagram image.",
"operationId": "generate_reaction_diagram_generate_reaction_diagram__post",
"parameters": [
{
"name": "reaction_smarts",
"in": "query",
"required": true,
"schema": {
"type": "string",
"title": "Reaction Smarts"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Body_generate_diagram_generate_diagram__post": {
"properties": {
"smiles": {
"items": {
"type": "string"
},
"type": "array",
"title": "Smiles"
},
"labels": {
"items": {
"type": "string"
},
"type": "array",
"title": "Labels"
}
},
"type": "object",
"required": [
"smiles",
"labels"
],
"title": "Body_generate_diagram_generate_diagram__post"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"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"
}
}
}
}