automatic-goggles


Nameautomatic-goggles JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/ashishorkalra/automatic-goggles
SummaryA package for extracting structured fields from call transcripts with confidence scores
upload_time2025-08-16 12:29:09
maintainerNone
docs_urlNone
authorAshish Kalra
requires_python<3.13,>=3.9
licenseMIT
keywords transcript processing field extraction ai natural language processing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Automatic Goggles

A Python package for extracting structured fields from call transcripts with confidence scores using DSPy and OpenAI's language models.

## Features

- Extract structured fields from conversation transcripts
- Get confidence scores for extracted data using log probabilities
- **Optional reasoning explanations** - Control performance and costs with the `include_reasoning` flag
- Support for multiple field types (currently supports string fields)
- Easy integration with OpenAI API
- Similar functionality to RetellAI post-call processing

## Installation

```bash
pip install automatic-goggles
```

## Quick Start

```python
from transtype import TranscriptProcessor

# Initialize the processor with your OpenAI API key
processor = TranscriptProcessor(api_key="your-openai-api-key")

# Define your input data
data = {
    "messages": [
        {
            "role": "assistant",
            "content": "Hi, this is Marcus, I'm a customer service representative with TechFlow Solutions in Downtown Seattle."
        },
        {
            "role": "user", 
            "content": "I need to discuss my account billing issues."
        }
    ],
    "fields": [
        {
            "field_name": "representative_name",
            "field_type": "string",
            "format_example": "Sarah Chen"
        }
    ]
}

# Process the transcript
result = processor.process(data)
print(result)
```

## Reasoning Flag

You can control whether to include reasoning explanations in the output using the `include_reasoning` parameter. This affects both performance and API costs:

### With Reasoning (Default)

```python
# Default behavior - includes detailed reasoning
processor = TranscriptProcessor(api_key="your-openai-api-key", include_reasoning=True)
# OR simply:
processor = TranscriptProcessor(api_key="your-openai-api-key")

result = processor.process(data)
# Output includes field_reason with explanation
```

### Without Reasoning (Faster & Cost-Effective)

```python
# Faster processing, lower API costs
processor = TranscriptProcessor(api_key="your-openai-api-key", include_reasoning=False)

result = processor.process(data)
# Output has field_reason set to null
```

**Benefits of disabling reasoning:**
- ⚡ **Faster processing** - Fewer tokens generated
- 💰 **Lower costs** - Reduced OpenAI API token usage
- 🎯 **Focused output** - Just the extracted values and confidence scores

**When to use each mode:**
- **With reasoning**: When you need explanations for debugging, quality assurance, or transparency
- **Without reasoning**: For production systems where you only need the extracted values

## Output Format

### With Reasoning (Default)

```json
{
    "fields": [
        {
            "field_name": "representative_name",
            "field_value": "Marcus",
            "field_confidence": 0.95,
            "field_reason": "Representative introduced himself as 'Marcus' at the beginning of the conversation"
        }
    ]
}
```

### Without Reasoning

```json
{
    "fields": [
        {
            "field_name": "representative_name",
            "field_value": "Marcus", 
            "field_confidence": 0.95,
            "field_reason": null
        }
    ]
}
```

## Requirements

- Python 3.8+
- OpenAI API key

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ashishorkalra/automatic-goggles",
    "name": "automatic-goggles",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": "transcript, processing, field extraction, AI, natural language processing",
    "author": "Ashish Kalra",
    "author_email": "Ashish Kalra <ashish.kalra@example.com>",
    "download_url": "https://files.pythonhosted.org/packages/55/06/697ad531696af3aad620b168ee38705e9df3a5a0a73aa6272f35ed8bbd18/automatic_goggles-0.2.0.tar.gz",
    "platform": null,
    "description": "# Automatic Goggles\n\nA Python package for extracting structured fields from call transcripts with confidence scores using DSPy and OpenAI's language models.\n\n## Features\n\n- Extract structured fields from conversation transcripts\n- Get confidence scores for extracted data using log probabilities\n- **Optional reasoning explanations** - Control performance and costs with the `include_reasoning` flag\n- Support for multiple field types (currently supports string fields)\n- Easy integration with OpenAI API\n- Similar functionality to RetellAI post-call processing\n\n## Installation\n\n```bash\npip install automatic-goggles\n```\n\n## Quick Start\n\n```python\nfrom transtype import TranscriptProcessor\n\n# Initialize the processor with your OpenAI API key\nprocessor = TranscriptProcessor(api_key=\"your-openai-api-key\")\n\n# Define your input data\ndata = {\n    \"messages\": [\n        {\n            \"role\": \"assistant\",\n            \"content\": \"Hi, this is Marcus, I'm a customer service representative with TechFlow Solutions in Downtown Seattle.\"\n        },\n        {\n            \"role\": \"user\", \n            \"content\": \"I need to discuss my account billing issues.\"\n        }\n    ],\n    \"fields\": [\n        {\n            \"field_name\": \"representative_name\",\n            \"field_type\": \"string\",\n            \"format_example\": \"Sarah Chen\"\n        }\n    ]\n}\n\n# Process the transcript\nresult = processor.process(data)\nprint(result)\n```\n\n## Reasoning Flag\n\nYou can control whether to include reasoning explanations in the output using the `include_reasoning` parameter. This affects both performance and API costs:\n\n### With Reasoning (Default)\n\n```python\n# Default behavior - includes detailed reasoning\nprocessor = TranscriptProcessor(api_key=\"your-openai-api-key\", include_reasoning=True)\n# OR simply:\nprocessor = TranscriptProcessor(api_key=\"your-openai-api-key\")\n\nresult = processor.process(data)\n# Output includes field_reason with explanation\n```\n\n### Without Reasoning (Faster & Cost-Effective)\n\n```python\n# Faster processing, lower API costs\nprocessor = TranscriptProcessor(api_key=\"your-openai-api-key\", include_reasoning=False)\n\nresult = processor.process(data)\n# Output has field_reason set to null\n```\n\n**Benefits of disabling reasoning:**\n- \u26a1 **Faster processing** - Fewer tokens generated\n- \ud83d\udcb0 **Lower costs** - Reduced OpenAI API token usage\n- \ud83c\udfaf **Focused output** - Just the extracted values and confidence scores\n\n**When to use each mode:**\n- **With reasoning**: When you need explanations for debugging, quality assurance, or transparency\n- **Without reasoning**: For production systems where you only need the extracted values\n\n## Output Format\n\n### With Reasoning (Default)\n\n```json\n{\n    \"fields\": [\n        {\n            \"field_name\": \"representative_name\",\n            \"field_value\": \"Marcus\",\n            \"field_confidence\": 0.95,\n            \"field_reason\": \"Representative introduced himself as 'Marcus' at the beginning of the conversation\"\n        }\n    ]\n}\n```\n\n### Without Reasoning\n\n```json\n{\n    \"fields\": [\n        {\n            \"field_name\": \"representative_name\",\n            \"field_value\": \"Marcus\", \n            \"field_confidence\": 0.95,\n            \"field_reason\": null\n        }\n    ]\n}\n```\n\n## Requirements\n\n- Python 3.8+\n- OpenAI API key\n\n## License\n\nMIT License\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A package for extracting structured fields from call transcripts with confidence scores",
    "version": "0.2.0",
    "project_urls": {
        "Bug Reports": "https://github.com/ashishorkalra/automatic-goggles/issues",
        "Documentation": "https://github.com/ashishorkalra/automatic-goggles#readme",
        "Homepage": "https://github.com/ashishorkalra/automatic-goggles",
        "Repository": "https://github.com/ashishorkalra/automatic-goggles"
    },
    "split_keywords": [
        "transcript",
        " processing",
        " field extraction",
        " ai",
        " natural language processing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "86650c41bf013d2e6fabb53cb56dea1afd1c3fa0846805770e17c39436afca7f",
                "md5": "eb7d56be233fa53d97aba842d1bf5a0a",
                "sha256": "3ab3ee9dd36724e04c61e2247d2b06da270dc0f3ed2d8f13a5c3f2d79a685ebd"
            },
            "downloads": -1,
            "filename": "automatic_goggles-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb7d56be233fa53d97aba842d1bf5a0a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 7051,
            "upload_time": "2025-08-16T12:29:07",
            "upload_time_iso_8601": "2025-08-16T12:29:07.491991Z",
            "url": "https://files.pythonhosted.org/packages/86/65/0c41bf013d2e6fabb53cb56dea1afd1c3fa0846805770e17c39436afca7f/automatic_goggles-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5506697ad531696af3aad620b168ee38705e9df3a5a0a73aa6272f35ed8bbd18",
                "md5": "9c41976f660acaed6c85b8db8cda3a6c",
                "sha256": "f91a210e597e1e17e05376327f643024a51e96463dcfed6c026943fe942ac629"
            },
            "downloads": -1,
            "filename": "automatic_goggles-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9c41976f660acaed6c85b8db8cda3a6c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 7057,
            "upload_time": "2025-08-16T12:29:09",
            "upload_time_iso_8601": "2025-08-16T12:29:09.001081Z",
            "url": "https://files.pythonhosted.org/packages/55/06/697ad531696af3aad620b168ee38705e9df3a5a0a73aa6272f35ed8bbd18/automatic_goggles-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-16 12:29:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ashishorkalra",
    "github_project": "automatic-goggles",
    "github_not_found": true,
    "lcname": "automatic-goggles"
}
        
Elapsed time: 0.49049s