casedev 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- casedev/__init__.py +104 -0
- casedev/_base_client.py +1995 -0
- casedev/_client.py +560 -0
- casedev/_compat.py +219 -0
- casedev/_constants.py +14 -0
- casedev/_exceptions.py +108 -0
- casedev/_files.py +123 -0
- casedev/_models.py +857 -0
- casedev/_qs.py +150 -0
- casedev/_resource.py +43 -0
- casedev/_response.py +830 -0
- casedev/_streaming.py +333 -0
- casedev/_types.py +260 -0
- casedev/_utils/__init__.py +64 -0
- casedev/_utils/_compat.py +45 -0
- casedev/_utils/_datetime_parse.py +136 -0
- casedev/_utils/_logs.py +25 -0
- casedev/_utils/_proxy.py +65 -0
- casedev/_utils/_reflection.py +42 -0
- casedev/_utils/_resources_proxy.py +24 -0
- casedev/_utils/_streams.py +12 -0
- casedev/_utils/_sync.py +58 -0
- casedev/_utils/_transform.py +457 -0
- casedev/_utils/_typing.py +156 -0
- casedev/_utils/_utils.py +421 -0
- casedev/_version.py +4 -0
- casedev/lib/.keep +4 -0
- casedev/py.typed +0 -0
- casedev/resources/__init__.py +173 -0
- casedev/resources/actions/__init__.py +33 -0
- casedev/resources/actions/actions.py +102 -0
- casedev/resources/actions/v1.py +640 -0
- casedev/resources/compute/__init__.py +33 -0
- casedev/resources/compute/compute.py +102 -0
- casedev/resources/compute/v1/__init__.py +89 -0
- casedev/resources/compute/v1/environments.py +492 -0
- casedev/resources/compute/v1/functions.py +278 -0
- casedev/resources/compute/v1/invoke.py +216 -0
- casedev/resources/compute/v1/runs.py +290 -0
- casedev/resources/compute/v1/secrets.py +655 -0
- casedev/resources/compute/v1/v1.py +583 -0
- casedev/resources/convert/__init__.py +33 -0
- casedev/resources/convert/convert.py +102 -0
- casedev/resources/convert/v1/__init__.py +33 -0
- casedev/resources/convert/v1/jobs.py +254 -0
- casedev/resources/convert/v1/v1.py +450 -0
- casedev/resources/format/__init__.py +33 -0
- casedev/resources/format/format.py +102 -0
- casedev/resources/format/v1/__init__.py +33 -0
- casedev/resources/format/v1/templates.py +419 -0
- casedev/resources/format/v1/v1.py +244 -0
- casedev/resources/llm/__init__.py +33 -0
- casedev/resources/llm/llm.py +192 -0
- casedev/resources/llm/v1/__init__.py +33 -0
- casedev/resources/llm/v1/chat.py +243 -0
- casedev/resources/llm/v1/v1.py +317 -0
- casedev/resources/ocr/__init__.py +33 -0
- casedev/resources/ocr/ocr.py +102 -0
- casedev/resources/ocr/v1.py +407 -0
- casedev/resources/search/__init__.py +33 -0
- casedev/resources/search/search.py +102 -0
- casedev/resources/search/v1.py +1052 -0
- casedev/resources/templates/__init__.py +33 -0
- casedev/resources/templates/templates.py +102 -0
- casedev/resources/templates/v1.py +633 -0
- casedev/resources/vault/__init__.py +47 -0
- casedev/resources/vault/graphrag.py +256 -0
- casedev/resources/vault/objects.py +571 -0
- casedev/resources/vault/vault.py +764 -0
- casedev/resources/voice/__init__.py +61 -0
- casedev/resources/voice/streaming.py +160 -0
- casedev/resources/voice/transcription.py +327 -0
- casedev/resources/voice/v1/__init__.py +33 -0
- casedev/resources/voice/v1/speak.py +478 -0
- casedev/resources/voice/v1/v1.py +290 -0
- casedev/resources/voice/voice.py +166 -0
- casedev/resources/webhooks/__init__.py +33 -0
- casedev/resources/webhooks/v1.py +447 -0
- casedev/resources/webhooks/webhooks.py +102 -0
- casedev/resources/workflows/__init__.py +33 -0
- casedev/resources/workflows/v1.py +1053 -0
- casedev/resources/workflows/workflows.py +102 -0
- casedev/types/__init__.py +12 -0
- casedev/types/actions/__init__.py +8 -0
- casedev/types/actions/v1_create_params.py +22 -0
- casedev/types/actions/v1_create_response.py +33 -0
- casedev/types/actions/v1_execute_params.py +16 -0
- casedev/types/actions/v1_execute_response.py +31 -0
- casedev/types/compute/__init__.py +7 -0
- casedev/types/compute/v1/__init__.py +18 -0
- casedev/types/compute/v1/environment_create_params.py +12 -0
- casedev/types/compute/v1/environment_create_response.py +34 -0
- casedev/types/compute/v1/environment_delete_response.py +11 -0
- casedev/types/compute/v1/function_get_logs_params.py +12 -0
- casedev/types/compute/v1/function_list_params.py +12 -0
- casedev/types/compute/v1/invoke_run_params.py +21 -0
- casedev/types/compute/v1/invoke_run_response.py +39 -0
- casedev/types/compute/v1/run_list_params.py +18 -0
- casedev/types/compute/v1/secret_create_params.py +24 -0
- casedev/types/compute/v1/secret_create_response.py +24 -0
- casedev/types/compute/v1/secret_delete_group_params.py +18 -0
- casedev/types/compute/v1/secret_list_params.py +15 -0
- casedev/types/compute/v1/secret_retrieve_group_params.py +12 -0
- casedev/types/compute/v1/secret_update_group_params.py +16 -0
- casedev/types/compute/v1_deploy_params.py +114 -0
- casedev/types/compute/v1_deploy_response.py +30 -0
- casedev/types/compute/v1_get_usage_params.py +15 -0
- casedev/types/convert/__init__.py +8 -0
- casedev/types/convert/v1/__init__.py +3 -0
- casedev/types/convert/v1_process_params.py +15 -0
- casedev/types/convert/v1_process_response.py +19 -0
- casedev/types/convert/v1_webhook_params.py +32 -0
- casedev/types/convert/v1_webhook_response.py +13 -0
- casedev/types/format/__init__.py +5 -0
- casedev/types/format/v1/__init__.py +7 -0
- casedev/types/format/v1/template_create_params.py +32 -0
- casedev/types/format/v1/template_create_response.py +27 -0
- casedev/types/format/v1/template_list_params.py +12 -0
- casedev/types/format/v1_create_document_params.py +42 -0
- casedev/types/llm/__init__.py +5 -0
- casedev/types/llm/v1/__init__.py +6 -0
- casedev/types/llm/v1/chat_create_completion_params.py +42 -0
- casedev/types/llm/v1/chat_create_completion_response.py +49 -0
- casedev/types/llm/v1_create_embedding_params.py +27 -0
- casedev/types/ocr/__init__.py +6 -0
- casedev/types/ocr/v1_process_params.py +44 -0
- casedev/types/ocr/v1_process_response.py +32 -0
- casedev/types/search/__init__.py +15 -0
- casedev/types/search/v1_answer_params.py +45 -0
- casedev/types/search/v1_answer_response.py +35 -0
- casedev/types/search/v1_contents_params.py +42 -0
- casedev/types/search/v1_contents_response.py +31 -0
- casedev/types/search/v1_research_params.py +23 -0
- casedev/types/search/v1_research_response.py +20 -0
- casedev/types/search/v1_retrieve_research_params.py +15 -0
- casedev/types/search/v1_search_params.py +56 -0
- casedev/types/search/v1_search_response.py +38 -0
- casedev/types/search/v1_similar_params.py +44 -0
- casedev/types/search/v1_similar_response.py +33 -0
- casedev/types/templates/__init__.py +8 -0
- casedev/types/templates/v1_execute_params.py +22 -0
- casedev/types/templates/v1_execute_response.py +31 -0
- casedev/types/templates/v1_list_params.py +32 -0
- casedev/types/templates/v1_search_params.py +18 -0
- casedev/types/vault/__init__.py +6 -0
- casedev/types/vault/object_create_presigned_url_params.py +22 -0
- casedev/types/vault/object_create_presigned_url_response.py +51 -0
- casedev/types/vault_create_params.py +20 -0
- casedev/types/vault_create_response.py +36 -0
- casedev/types/vault_ingest_response.py +26 -0
- casedev/types/vault_list_response.py +40 -0
- casedev/types/vault_search_params.py +27 -0
- casedev/types/vault_search_response.py +53 -0
- casedev/types/vault_upload_params.py +26 -0
- casedev/types/vault_upload_response.py +39 -0
- casedev/types/voice/__init__.py +7 -0
- casedev/types/voice/transcription_create_params.py +36 -0
- casedev/types/voice/transcription_retrieve_response.py +41 -0
- casedev/types/voice/v1/__init__.py +6 -0
- casedev/types/voice/v1/speak_create_params.py +59 -0
- casedev/types/voice/v1/speak_stream_params.py +58 -0
- casedev/types/voice/v1_list_voices_params.py +36 -0
- casedev/types/webhooks/__init__.py +6 -0
- casedev/types/webhooks/v1_create_params.py +20 -0
- casedev/types/webhooks/v1_create_response.py +33 -0
- casedev/types/workflows/__init__.py +19 -0
- casedev/types/workflows/v1_create_params.py +32 -0
- casedev/types/workflows/v1_create_response.py +29 -0
- casedev/types/workflows/v1_delete_response.py +13 -0
- casedev/types/workflows/v1_deploy_response.py +20 -0
- casedev/types/workflows/v1_execute_params.py +12 -0
- casedev/types/workflows/v1_execute_response.py +22 -0
- casedev/types/workflows/v1_list_executions_params.py +13 -0
- casedev/types/workflows/v1_list_executions_response.py +27 -0
- casedev/types/workflows/v1_list_params.py +18 -0
- casedev/types/workflows/v1_list_response.py +37 -0
- casedev/types/workflows/v1_retrieve_execution_response.py +31 -0
- casedev/types/workflows/v1_retrieve_response.py +35 -0
- casedev/types/workflows/v1_undeploy_response.py +13 -0
- casedev/types/workflows/v1_update_params.py +26 -0
- casedev/types/workflows/v1_update_response.py +17 -0
- casedev-0.1.0.dist-info/METADATA +454 -0
- casedev-0.1.0.dist-info/RECORD +185 -0
- casedev-0.1.0.dist-info/WHEEL +4 -0
- casedev-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from ..._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["V1DeployResponse"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class V1DeployResponse(BaseModel):
|
|
14
|
+
created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None)
|
|
15
|
+
"""Deployment timestamp"""
|
|
16
|
+
|
|
17
|
+
deployment_id: Optional[str] = FieldInfo(alias="deploymentId", default=None)
|
|
18
|
+
"""Unique deployment identifier"""
|
|
19
|
+
|
|
20
|
+
environment: Optional[str] = None
|
|
21
|
+
"""Environment name"""
|
|
22
|
+
|
|
23
|
+
runtime: Optional[str] = None
|
|
24
|
+
"""Runtime used"""
|
|
25
|
+
|
|
26
|
+
status: Optional[str] = None
|
|
27
|
+
"""Deployment status"""
|
|
28
|
+
|
|
29
|
+
url: Optional[str] = None
|
|
30
|
+
"""Service endpoint URL (for web services)"""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["V1GetUsageParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class V1GetUsageParams(TypedDict, total=False):
|
|
11
|
+
month: int
|
|
12
|
+
"""Month to filter usage data (1-12, defaults to current month)"""
|
|
13
|
+
|
|
14
|
+
year: int
|
|
15
|
+
"""Year to filter usage data (defaults to current year)"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .v1_process_params import V1ProcessParams as V1ProcessParams
|
|
6
|
+
from .v1_webhook_params import V1WebhookParams as V1WebhookParams
|
|
7
|
+
from .v1_process_response import V1ProcessResponse as V1ProcessResponse
|
|
8
|
+
from .v1_webhook_response import V1WebhookResponse as V1WebhookResponse
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["V1ProcessParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class V1ProcessParams(TypedDict, total=False):
|
|
11
|
+
input_url: Required[str]
|
|
12
|
+
"""HTTPS URL to the FTR file (must be a valid S3 presigned URL)"""
|
|
13
|
+
|
|
14
|
+
callback_url: str
|
|
15
|
+
"""Optional webhook URL to receive conversion completion notification"""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ..._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["V1ProcessResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class V1ProcessResponse(BaseModel):
|
|
12
|
+
job_id: Optional[str] = None
|
|
13
|
+
"""Unique identifier for the conversion job"""
|
|
14
|
+
|
|
15
|
+
message: Optional[str] = None
|
|
16
|
+
"""Instructions for checking job status"""
|
|
17
|
+
|
|
18
|
+
status: Optional[Literal["queued", "processing", "completed", "failed"]] = None
|
|
19
|
+
"""Current status of the conversion job"""
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["V1WebhookParams", "Result"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class V1WebhookParams(TypedDict, total=False):
|
|
11
|
+
job_id: Required[str]
|
|
12
|
+
"""Unique identifier for the conversion job"""
|
|
13
|
+
|
|
14
|
+
status: Required[Literal["completed", "failed"]]
|
|
15
|
+
"""Status of the conversion job"""
|
|
16
|
+
|
|
17
|
+
error: str
|
|
18
|
+
"""Error message for failed jobs"""
|
|
19
|
+
|
|
20
|
+
result: Result
|
|
21
|
+
"""Result data for completed jobs"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Result(TypedDict, total=False):
|
|
25
|
+
duration_seconds: float
|
|
26
|
+
"""Processing duration in seconds"""
|
|
27
|
+
|
|
28
|
+
file_size_bytes: int
|
|
29
|
+
"""Size of processed file in bytes"""
|
|
30
|
+
|
|
31
|
+
stored_filename: str
|
|
32
|
+
"""Filename where converted file is stored"""
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["V1WebhookResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class V1WebhookResponse(BaseModel):
|
|
11
|
+
message: Optional[str] = None
|
|
12
|
+
|
|
13
|
+
success: Optional[bool] = None
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .template_list_params import TemplateListParams as TemplateListParams
|
|
6
|
+
from .template_create_params import TemplateCreateParams as TemplateCreateParams
|
|
7
|
+
from .template_create_response import TemplateCreateResponse as TemplateCreateResponse
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
from ...._types import SequenceNotStr
|
|
8
|
+
|
|
9
|
+
__all__ = ["TemplateCreateParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TemplateCreateParams(TypedDict, total=False):
|
|
13
|
+
content: Required[str]
|
|
14
|
+
"""Template content with {{variable}} placeholders"""
|
|
15
|
+
|
|
16
|
+
name: Required[str]
|
|
17
|
+
"""Template name"""
|
|
18
|
+
|
|
19
|
+
type: Required[Literal["caption", "signature", "letterhead", "certificate", "footer", "custom"]]
|
|
20
|
+
"""Template type"""
|
|
21
|
+
|
|
22
|
+
description: str
|
|
23
|
+
"""Template description"""
|
|
24
|
+
|
|
25
|
+
styles: object
|
|
26
|
+
"""CSS styles for the template"""
|
|
27
|
+
|
|
28
|
+
tags: SequenceNotStr[str]
|
|
29
|
+
"""Template tags for organization"""
|
|
30
|
+
|
|
31
|
+
variables: SequenceNotStr[str]
|
|
32
|
+
"""Template variables (auto-detected if not provided)"""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from pydantic import Field as FieldInfo
|
|
7
|
+
|
|
8
|
+
from ...._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["TemplateCreateResponse"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TemplateCreateResponse(BaseModel):
|
|
14
|
+
id: Optional[str] = None
|
|
15
|
+
"""Template ID"""
|
|
16
|
+
|
|
17
|
+
created_at: Optional[datetime] = FieldInfo(alias="createdAt", default=None)
|
|
18
|
+
"""Creation timestamp"""
|
|
19
|
+
|
|
20
|
+
name: Optional[str] = None
|
|
21
|
+
"""Template name"""
|
|
22
|
+
|
|
23
|
+
type: Optional[str] = None
|
|
24
|
+
"""Template type"""
|
|
25
|
+
|
|
26
|
+
variables: Optional[List[str]] = None
|
|
27
|
+
"""Detected template variables"""
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["TemplateListParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TemplateListParams(TypedDict, total=False):
|
|
11
|
+
type: str
|
|
12
|
+
"""Filter templates by type (e.g., contract, pleading, letter)"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["V1CreateDocumentParams", "Options", "OptionsComponent"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class V1CreateDocumentParams(TypedDict, total=False):
|
|
14
|
+
content: Required[str]
|
|
15
|
+
"""The source content to format"""
|
|
16
|
+
|
|
17
|
+
output_format: Required[Literal["pdf", "docx", "html_preview"]]
|
|
18
|
+
"""Desired output format"""
|
|
19
|
+
|
|
20
|
+
input_format: Literal["md", "json", "text"]
|
|
21
|
+
"""Format of the input content"""
|
|
22
|
+
|
|
23
|
+
options: Options
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class OptionsComponent(TypedDict, total=False):
|
|
27
|
+
content: str
|
|
28
|
+
"""Inline template content"""
|
|
29
|
+
|
|
30
|
+
styles: object
|
|
31
|
+
"""Custom styling options"""
|
|
32
|
+
|
|
33
|
+
template_id: Annotated[str, PropertyInfo(alias="templateId")]
|
|
34
|
+
"""ID of saved template component"""
|
|
35
|
+
|
|
36
|
+
variables: object
|
|
37
|
+
"""Variables for template interpolation"""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class Options(TypedDict, total=False):
|
|
41
|
+
components: Iterable[OptionsComponent]
|
|
42
|
+
"""Template components with variables"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .chat_create_completion_params import ChatCreateCompletionParams as ChatCreateCompletionParams
|
|
6
|
+
from .chat_create_completion_response import ChatCreateCompletionResponse as ChatCreateCompletionResponse
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Iterable
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["ChatCreateCompletionParams", "Message"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ChatCreateCompletionParams(TypedDict, total=False):
|
|
12
|
+
messages: Required[Iterable[Message]]
|
|
13
|
+
"""List of messages comprising the conversation"""
|
|
14
|
+
|
|
15
|
+
frequency_penalty: float
|
|
16
|
+
"""Frequency penalty parameter"""
|
|
17
|
+
|
|
18
|
+
max_tokens: int
|
|
19
|
+
"""Maximum number of tokens to generate"""
|
|
20
|
+
|
|
21
|
+
model: str
|
|
22
|
+
"""Model to use for completion. Defaults to casemark-core-1 if not specified"""
|
|
23
|
+
|
|
24
|
+
presence_penalty: float
|
|
25
|
+
"""Presence penalty parameter"""
|
|
26
|
+
|
|
27
|
+
stream: bool
|
|
28
|
+
"""Whether to stream back partial progress"""
|
|
29
|
+
|
|
30
|
+
temperature: float
|
|
31
|
+
"""Sampling temperature between 0 and 2"""
|
|
32
|
+
|
|
33
|
+
top_p: float
|
|
34
|
+
"""Nucleus sampling parameter"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Message(TypedDict, total=False):
|
|
38
|
+
content: str
|
|
39
|
+
"""The contents of the message"""
|
|
40
|
+
|
|
41
|
+
role: Literal["system", "user", "assistant"]
|
|
42
|
+
"""The role of the message author"""
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from ...._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["ChatCreateCompletionResponse", "Choice", "ChoiceMessage", "Usage"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ChoiceMessage(BaseModel):
|
|
11
|
+
content: Optional[str] = None
|
|
12
|
+
|
|
13
|
+
role: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Choice(BaseModel):
|
|
17
|
+
finish_reason: Optional[str] = None
|
|
18
|
+
|
|
19
|
+
index: Optional[int] = None
|
|
20
|
+
|
|
21
|
+
message: Optional[ChoiceMessage] = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Usage(BaseModel):
|
|
25
|
+
completion_tokens: Optional[int] = None
|
|
26
|
+
|
|
27
|
+
cost: Optional[float] = None
|
|
28
|
+
"""Cost in USD"""
|
|
29
|
+
|
|
30
|
+
prompt_tokens: Optional[int] = None
|
|
31
|
+
|
|
32
|
+
total_tokens: Optional[int] = None
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ChatCreateCompletionResponse(BaseModel):
|
|
36
|
+
id: Optional[str] = None
|
|
37
|
+
"""Unique identifier for the completion"""
|
|
38
|
+
|
|
39
|
+
choices: Optional[List[Choice]] = None
|
|
40
|
+
|
|
41
|
+
created: Optional[int] = None
|
|
42
|
+
"""Unix timestamp of completion creation"""
|
|
43
|
+
|
|
44
|
+
model: Optional[str] = None
|
|
45
|
+
"""Model used for completion"""
|
|
46
|
+
|
|
47
|
+
object: Optional[str] = None
|
|
48
|
+
|
|
49
|
+
usage: Optional[Usage] = None
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from ..._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["V1CreateEmbeddingParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class V1CreateEmbeddingParams(TypedDict, total=False):
|
|
14
|
+
input: Required[Union[str, SequenceNotStr[str]]]
|
|
15
|
+
"""Text or array of texts to create embeddings for"""
|
|
16
|
+
|
|
17
|
+
model: Required[str]
|
|
18
|
+
"""Embedding model to use (e.g., text-embedding-ada-002, text-embedding-3-small)"""
|
|
19
|
+
|
|
20
|
+
dimensions: int
|
|
21
|
+
"""Number of dimensions for the embeddings (model-specific)"""
|
|
22
|
+
|
|
23
|
+
encoding_format: Literal["float", "base64"]
|
|
24
|
+
"""Format for returned embeddings"""
|
|
25
|
+
|
|
26
|
+
user: str
|
|
27
|
+
"""Unique identifier for the end-user"""
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["V1ProcessParams", "Features"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class V1ProcessParams(TypedDict, total=False):
|
|
11
|
+
document_url: Required[str]
|
|
12
|
+
"""URL or S3 path to the document to process"""
|
|
13
|
+
|
|
14
|
+
callback_url: str
|
|
15
|
+
"""URL to receive completion webhook"""
|
|
16
|
+
|
|
17
|
+
document_id: str
|
|
18
|
+
"""Optional custom document identifier"""
|
|
19
|
+
|
|
20
|
+
engine: Literal["doctr", "paddleocr"]
|
|
21
|
+
"""OCR engine to use"""
|
|
22
|
+
|
|
23
|
+
features: Features
|
|
24
|
+
"""OCR features to extract"""
|
|
25
|
+
|
|
26
|
+
result_bucket: str
|
|
27
|
+
"""S3 bucket to store results"""
|
|
28
|
+
|
|
29
|
+
result_prefix: str
|
|
30
|
+
"""S3 key prefix for results"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class Features(TypedDict, total=False):
|
|
34
|
+
forms: bool
|
|
35
|
+
"""Detect form fields"""
|
|
36
|
+
|
|
37
|
+
layout: bool
|
|
38
|
+
"""Preserve document layout"""
|
|
39
|
+
|
|
40
|
+
tables: bool
|
|
41
|
+
"""Detect and extract tables"""
|
|
42
|
+
|
|
43
|
+
text: bool
|
|
44
|
+
"""Extract text content"""
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["V1ProcessResponse"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class V1ProcessResponse(BaseModel):
|
|
13
|
+
id: Optional[str] = None
|
|
14
|
+
"""Unique job identifier"""
|
|
15
|
+
|
|
16
|
+
created_at: Optional[datetime] = None
|
|
17
|
+
"""Job creation timestamp"""
|
|
18
|
+
|
|
19
|
+
document_id: Optional[str] = None
|
|
20
|
+
"""Document identifier"""
|
|
21
|
+
|
|
22
|
+
engine: Optional[str] = None
|
|
23
|
+
"""OCR engine used"""
|
|
24
|
+
|
|
25
|
+
estimated_completion: Optional[datetime] = None
|
|
26
|
+
"""Estimated completion time"""
|
|
27
|
+
|
|
28
|
+
page_count: Optional[int] = None
|
|
29
|
+
"""Number of pages detected"""
|
|
30
|
+
|
|
31
|
+
status: Optional[Literal["queued", "processing", "completed", "failed"]] = None
|
|
32
|
+
"""Current job status"""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .v1_answer_params import V1AnswerParams as V1AnswerParams
|
|
6
|
+
from .v1_search_params import V1SearchParams as V1SearchParams
|
|
7
|
+
from .v1_similar_params import V1SimilarParams as V1SimilarParams
|
|
8
|
+
from .v1_answer_response import V1AnswerResponse as V1AnswerResponse
|
|
9
|
+
from .v1_contents_params import V1ContentsParams as V1ContentsParams
|
|
10
|
+
from .v1_research_params import V1ResearchParams as V1ResearchParams
|
|
11
|
+
from .v1_search_response import V1SearchResponse as V1SearchResponse
|
|
12
|
+
from .v1_similar_response import V1SimilarResponse as V1SimilarResponse
|
|
13
|
+
from .v1_contents_response import V1ContentsResponse as V1ContentsResponse
|
|
14
|
+
from .v1_research_response import V1ResearchResponse as V1ResearchResponse
|
|
15
|
+
from .v1_retrieve_research_params import V1RetrieveResearchParams as V1RetrieveResearchParams
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._types import SequenceNotStr
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["V1AnswerParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class V1AnswerParams(TypedDict, total=False):
|
|
14
|
+
query: Required[str]
|
|
15
|
+
"""The question or topic to research and answer"""
|
|
16
|
+
|
|
17
|
+
exclude_domains: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludeDomains")]
|
|
18
|
+
"""Exclude these domains from search"""
|
|
19
|
+
|
|
20
|
+
include_domains: Annotated[SequenceNotStr[str], PropertyInfo(alias="includeDomains")]
|
|
21
|
+
"""Only search within these domains"""
|
|
22
|
+
|
|
23
|
+
max_tokens: Annotated[int, PropertyInfo(alias="maxTokens")]
|
|
24
|
+
"""Maximum tokens for LLM response"""
|
|
25
|
+
|
|
26
|
+
model: str
|
|
27
|
+
"""LLM model to use when useCustomLLM is true"""
|
|
28
|
+
|
|
29
|
+
num_results: Annotated[int, PropertyInfo(alias="numResults")]
|
|
30
|
+
"""Number of search results to consider"""
|
|
31
|
+
|
|
32
|
+
search_type: Annotated[Literal["auto", "web", "news", "academic"], PropertyInfo(alias="searchType")]
|
|
33
|
+
"""Type of search to perform"""
|
|
34
|
+
|
|
35
|
+
stream: bool
|
|
36
|
+
"""Stream the response (only for native provider answers)"""
|
|
37
|
+
|
|
38
|
+
temperature: float
|
|
39
|
+
"""LLM temperature for answer generation"""
|
|
40
|
+
|
|
41
|
+
text: bool
|
|
42
|
+
"""Include text content in response"""
|
|
43
|
+
|
|
44
|
+
use_custom_llm: Annotated[bool, PropertyInfo(alias="useCustomLLM")]
|
|
45
|
+
"""Use Case.dev LLM for answer generation instead of provider's native answer"""
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from pydantic import Field as FieldInfo
|
|
6
|
+
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["V1AnswerResponse", "Citation"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Citation(BaseModel):
|
|
13
|
+
id: Optional[str] = None
|
|
14
|
+
|
|
15
|
+
published_date: Optional[str] = FieldInfo(alias="publishedDate", default=None)
|
|
16
|
+
|
|
17
|
+
text: Optional[str] = None
|
|
18
|
+
|
|
19
|
+
title: Optional[str] = None
|
|
20
|
+
|
|
21
|
+
url: Optional[str] = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class V1AnswerResponse(BaseModel):
|
|
25
|
+
answer: Optional[str] = None
|
|
26
|
+
"""The generated answer with citations"""
|
|
27
|
+
|
|
28
|
+
citations: Optional[List[Citation]] = None
|
|
29
|
+
"""Sources used to generate the answer"""
|
|
30
|
+
|
|
31
|
+
model: Optional[str] = None
|
|
32
|
+
"""Model used for answer generation"""
|
|
33
|
+
|
|
34
|
+
search_type: Optional[str] = FieldInfo(alias="searchType", default=None)
|
|
35
|
+
"""Type of search performed"""
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
6
|
+
|
|
7
|
+
from ..._types import SequenceNotStr
|
|
8
|
+
from ..._utils import PropertyInfo
|
|
9
|
+
|
|
10
|
+
__all__ = ["V1ContentsParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class V1ContentsParams(TypedDict, total=False):
|
|
14
|
+
urls: Required[SequenceNotStr[str]]
|
|
15
|
+
"""Array of URLs to scrape and extract content from"""
|
|
16
|
+
|
|
17
|
+
context: str
|
|
18
|
+
"""Context to guide content extraction and summarization"""
|
|
19
|
+
|
|
20
|
+
extras: object
|
|
21
|
+
"""Additional extraction options"""
|
|
22
|
+
|
|
23
|
+
highlights: bool
|
|
24
|
+
"""Whether to include content highlights"""
|
|
25
|
+
|
|
26
|
+
livecrawl: bool
|
|
27
|
+
"""Whether to perform live crawling for dynamic content"""
|
|
28
|
+
|
|
29
|
+
livecrawl_timeout: Annotated[int, PropertyInfo(alias="livecrawlTimeout")]
|
|
30
|
+
"""Timeout in seconds for live crawling"""
|
|
31
|
+
|
|
32
|
+
subpages: bool
|
|
33
|
+
"""Whether to extract content from linked subpages"""
|
|
34
|
+
|
|
35
|
+
subpage_target: Annotated[int, PropertyInfo(alias="subpageTarget")]
|
|
36
|
+
"""Maximum number of subpages to crawl"""
|
|
37
|
+
|
|
38
|
+
summary: bool
|
|
39
|
+
"""Whether to generate content summaries"""
|
|
40
|
+
|
|
41
|
+
text: bool
|
|
42
|
+
"""Whether to extract text content"""
|