A package for extracting structured fields from call transcripts with confidence scores
Project description
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
- Support for multiple field types (currently supports string fields)
- Easy integration with OpenAI API
- Similar functionality to RetellAI post-call processing
Installation
pip install automatic-goggles
Quick Start
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)
Output Format
{
"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"
}
]
}
Requirements
- Python 3.8+
- OpenAI API key
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file automatic_goggles-0.1.0.tar.gz.
File metadata
- Download URL: automatic_goggles-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48da61fb16fce7ab58676d1cbe20d7eea52635f9147aeb2a610fd795d88386a8
|
|
| MD5 |
6018cb4dc9c58c9917fc995207f708cb
|
|
| BLAKE2b-256 |
82ebea5afb4eb9bebba348228979b73364f0b3215b62dd2ba352018b74dc635a
|
File details
Details for the file automatic_goggles-0.1.0-py3-none-any.whl.
File metadata
- Download URL: automatic_goggles-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d3f8d5f0edfa0ec0af5ddc2dc4bddea90be16e81523ff8c0c3c432285aa5e4c
|
|
| MD5 |
fadb23a42490022cc4e1f39583e6f32a
|
|
| BLAKE2b-256 |
9ba49829c8355397022f7861ef0f45edb0b0796ed55043d2a09dde1b924e154d
|