Przejdź do treści
Biblioteka skilli
AI i agenci · Integracja z narzędziem

deepgram-python-text-intelligence

/deepgram-python-text-intelligence

Obsługuje w Pythonie Deepgram Text Intelligence (/v1/read): sentyment, streszczanie, wykrywanie tematów i rozpoznawanie intencji w tekście lub pod adresem URL.

Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
5
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Obsługuje w Pythonie Deepgram Text Intelligence (/v1/read): sentyment, streszczanie, wykrywanie tematów i rozpoznawanie intencji w tekście lub pod adresem URL.

Wyzwalacze z opisu

read APItext intelligenceanalyze textsentimentsummarize texttopicsintentsread.v1
Oryginalny opis (EN)

Use when writing or reviewing Python code in this repo that calls Deepgram Text Intelligence / Read (`/v1/read`) for sentiment, summarization, topic detection, and intent recognition on text input. Covers `client.read.v1.text.analyze(...)` with body `text` or `url`. Use `deepgram-python-audio-intelligence` when the source is audio instead of text. Triggers include "read API", "text intelligence", "analyze text", "sentiment", "summarize text", "topics", "intents", "read.v1".

Jak działa

  1. When to use this product
  2. Authentication
  3. Quick start
  4. Async equivalent
  5. Key parameters
  6. Response shape (abridged)
  7. API reference (layered)
  8. Gotchas
  9. Example files in this repo
  10. Central product skills
Sekcje z nagłówków SKILL.md, w oryginale · 118 linii, 580 słów
Podgląd SKILL.md
---
name: deepgram-python-text-intelligence
description: Use when writing or reviewing Python code in this repo that calls Deepgram Text Intelligence / Read (`/v1/read`) for sentiment, summarization, topic detection, and intent recognition on text input. Covers `client.read.v1.text.analyze(...)` with body `text` or `url`. Use `deepgram-python-audio-intelligence` when the source is audio instead of text. Triggers include "read API", "text intelligence", "analyze text", "sentiment", "summarize text", "topics", "intents", "read.v1".
---

# Using Deepgram Text Intelligence (Python SDK)

Analyze plain text (or a hosted text URL) for sentiment, summarization, topics, and intents via `/v1/read`.

## When to use this product

- You have **text already** (a transcript, document, chat log, email) and want analytics.
- You want a quick one-shot analysis — REST only, no streaming.

**Use a different skill when:**
- The source is audio and you want analytics overlays → `deepgram-python-audio-intelligence` (same analytics, applied at transcription time).

## Authentication

```python
from dotenv import load_dotenv
load_dotenv()

from deepgram import DeepgramClient
client = DeepgramClient()
```

Header: `Authorization: Token <api_key>`.

## Quick start

```python
response = client.read.v1.text.analyze(
    request={"text": "Hello, world! This is a sample text for analysis."},
    language="en",
    sentiment=True,
    summarize=True,   # /v1/read is boolean-only (see gotchas)
    topics=True,
    intents=True,
)

if response.results.sentiments:
    print("sentiment avg:", response.results.sentiments.average)
if response.results.summary:
    print("summary:", response.results.summary.text)
if response.results.topics:
    print("topics:", response.results.topics.segments)
if response.results.intents:
    print("intents:", response.results.intents.segments)
```

Pass `request={"text": "..."}` for raw text OR `request={"url": "https://..."}` for a hosted plain-text document.

## Async equivalent

```python
from deepgram import AsyncDeepgramClient
client = AsyncDeepgramClient()
response = await client.read.v1.text.analyze(request={"text": "..."}, language="en", sentiment=True)
```

## Key parameters

| Param | Type | Notes |
|---|---|---|
| `request` | `{"text": str}` or `{"url": str}` | One of these is required |
| `language` | `str` | Required for most analytics. English only today. |
| `sentiment` | `bool` | Per-segment + average sentiment |
| `summarize` | `bool` | `/v1/read` accepts **boolean only**. The SDK type alias `TextAnalyzeRequestSummarize = typing.Union[typing.Literal["v2"], typing.Any]` is shared with Listen and is broader than what Read actually supports — the `analyze` method docstring states: "For Read API, accepts boolean only." (Listen's `summarize="v2"` is a different product — see `deepgram-python-audio-intelligence`.) |
| `topics` | `bool` | Topic detection per segment |
| `intents` | `bool` | Intent recognition per segment |
| `custom_topic` / `custom_topic_mode` | `list[str]` / `str` | User-defined topics |
| `custom_intent` / `custom_intent_mode` | `list[str]` / `str` | User-defined intents |
| `callback`, `callback_method`, `tag` | | Async callback + metadata |

## Response shape (abridged)

```
response.results.summary.text
response.results.sentiments.segments[]
response.results.sentiments.average
response.results.topics.segments[]
response.results.intents.segments[]
response.metadata
```

See `reference.md` → "Read V1 Text" for full shape. Request body model: `ReadV1RequestParams`.

## API reference (layered)

1. **In-repo reference**: `reference.md` — "Read V1 Text".
2. **OpenAPI (REST)**: https://developers.deepgram.com/openapi.yaml
3. **Context7**: library ID `/llmstxt/developers_deepgram_llms_txt`.
4. **Product docs**:
   - https://developers.deepgram.com/reference/text-intelligence/analyze-text
   - https://developers.deepgram.com/docs/text-intelligence
   - https://developers.deepgram.com/docs/text-sentiment-analysis

## Gotchas

1. **`Token` auth, not `Bearer`.**
2. **English-only** for sentiment / summarize / topics / intents today.
3. **`summarize` on `/v1/read` is boolean only.** Pass `True` or `False`. Do not pass `"v2"` on `/v1/read` — that's a Listen-only option (see `deepgram-python-audio-intelligence`). The SDK type `Union[Literal["v2"], Any]` is shared with Listen and wider than Read actually accepts; the `analyze` docstring clarifies: "For Read API, accepts boolean only." The generated wire test passing `summarize="v2"` against a mock server is a Fern artifact and does not indicate real `/v1/read` support.
4. **`language` is required** for the gated analytics features above.
5. **Body is JSON `request=`**, not query parameters. Don't confuse with `/v1/listen` which takes audio as the body.
6. **Custom topics/intents need a mode** (`custom_topic_mode="extended"`, `"strict"`) or they are ignored.

## Example files in this repo

- `examples/40-text-intelligence.py`
- `tests/wire/test_read_v1_text.py`

## Central product skills

For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:

```bash
npx skills add deepgram/skills
```

This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).

Wersje

W bazie nie ma innych skilli o nazwie deepgram-python-text-intelligence.

Migawka bazy z 13.11.2026 · wersja paczki d153e7dcdcc6 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100deepgram-js-text-intelligence
    Obsługuje w JavaScripcie i TypeScripcie Deepgram Text Intelligence (/v1/read): sentyment, streszczanie, wykrywanie tematów i rozpoznawanie intencji w tekście lub pod adresem URL.
  • 100deepgram-dotnet-text-intelligence
    Obsługuje w C# Deepgram Text Intelligence (Read) dla tekstu i adresów URL z tekstem: sentyment, streszczenia, wykrywanie tematów i rozpoznawanie intencji przez klienta Analyze.
  • 100deepgram-java-text-intelligence
    Obsługuje w Javie Deepgram Text Intelligence (/v1/read) do analizy tekstu: sentyment, tematy, intencje i podsumowania przez client.read().v1().text().analyze z ReadV1Request lub TextAnalyzeRequest.
  • 100deepgram-python-audio-intelligence
    Obsługuje w Pythonie nakładki analityczne audio Deepgram na /v1/listen: podsumowania, tematy, intencje, sentyment, diaryzacja, redakcja, wykrywanie języka i encje, przez REST i WebSocket.
  • 100deepgram-go-text-intelligence
    Wysyła w Go tekst do Deepgram Read przez klienta analyze, w tym analizę sentymentu, tematów i intencji dla treści tekstowych.
  • 100deepgram-js-audio-intelligence
    Obsługuje w JavaScripcie i TypeScripcie nakładki analityczne audio Deepgram na /v1/listen: podsumowania, tematy, intencje, sentyment, diaryzacja, redakcja, wykrywanie języka i encje, przez REST i WebSocket.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.