Skip to content

Commit

Permalink
Merge pull request #359 from dvonthenen/keyword-fix
Browse files Browse the repository at this point in the history
Fix keyword, search, etc Input with List[str]
  • Loading branch information
davidvonthenen authored Apr 8, 2024
2 parents b474044 + 1eb6867 commit 44398e1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions deepgram/clients/analyze/v1/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dataclasses_json import dataclass_json, config

from io import BufferedReader
from typing import Union, Optional
from typing import List, Union, Optional
from typing_extensions import TypedDict
import logging, verboselogs

Expand All @@ -27,13 +27,13 @@ class AnalyzeOptions:
callback_method: Optional[str] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_intent: Optional[Union[list, str]] = field(
custom_intent: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_intent_mode: Optional[str] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_topic: Optional[Union[list, str]] = field(
custom_topic: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_topic_mode: Optional[str] = field(
Expand Down
10 changes: 5 additions & 5 deletions deepgram/clients/live/v1/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class LiveOptions:
endpointing: Optional[str] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
extra: Optional[Union[list, str]] = field(
extra: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
filler_words: Optional[bool] = field(
Expand All @@ -51,7 +51,7 @@ class LiveOptions:
interim_results: Optional[bool] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
keywords: Optional[str] = field(
keywords: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
language: Optional[str] = field(
Expand All @@ -75,19 +75,19 @@ class LiveOptions:
redact: Optional[Union[List[str], bool, str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
replace: Optional[str] = field(
replace: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
sample_rate: Optional[int] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
search: Optional[str] = field(
search: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
smart_format: Optional[bool] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
tag: Optional[list] = field(
tag: Optional[List[str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
tier: Optional[str] = field(
Expand Down
14 changes: 7 additions & 7 deletions deepgram/clients/prerecorded/v1/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class PrerecordedOptions:
callback_method: Optional[str] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_intent: Optional[Union[list, str]] = field(
custom_intent: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_intent_mode: Optional[str] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_topics: Optional[Union[list, str]] = field(
custom_topics: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
custom_topic_mode: Optional[str] = field(
Expand All @@ -66,7 +66,7 @@ class PrerecordedOptions:
encoding: Optional[str] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
extra: Optional[Union[list, str]] = field(
extra: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
filler_words: Optional[bool] = field(
Expand All @@ -75,7 +75,7 @@ class PrerecordedOptions:
intents: Optional[bool] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
keywords: Optional[Union[list, str]] = field(
keywords: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
language: Optional[str] = field(
Expand Down Expand Up @@ -105,13 +105,13 @@ class PrerecordedOptions:
redact: Optional[Union[List[str], bool, str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
replace: Optional[Union[list, str]] = field(
replace: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
sample_rate: Optional[int] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
search: Optional[Union[list, str]] = field(
search: Optional[Union[List[str], str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
sentiment: Optional[bool] = field(
Expand All @@ -123,7 +123,7 @@ class PrerecordedOptions:
summarize: Optional[Union[bool, str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
tag: Optional[list] = field(
tag: Optional[List[str]] = field(
default=None, metadata=config(exclude=lambda f: f is None)
)
tier: Optional[str] = field(
Expand Down

0 comments on commit 44398e1

Please sign in to comment.