phenoml 0.0.1__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.
Potentially problematic release.
This version of phenoml might be problematic. Click here for more details.
- phenoml/__init__.py +30 -0
- phenoml/agent/__init__.py +58 -0
- phenoml/agent/client.py +820 -0
- phenoml/agent/errors/__init__.py +11 -0
- phenoml/agent/errors/bad_request_error.py +10 -0
- phenoml/agent/errors/forbidden_error.py +10 -0
- phenoml/agent/errors/internal_server_error.py +10 -0
- phenoml/agent/errors/not_found_error.py +10 -0
- phenoml/agent/errors/unauthorized_error.py +10 -0
- phenoml/agent/prompts/__init__.py +7 -0
- phenoml/agent/prompts/client.py +707 -0
- phenoml/agent/prompts/raw_client.py +1345 -0
- phenoml/agent/prompts/types/__init__.py +8 -0
- phenoml/agent/prompts/types/prompts_delete_response.py +20 -0
- phenoml/agent/prompts/types/prompts_list_response.py +22 -0
- phenoml/agent/raw_client.py +1501 -0
- phenoml/agent/types/__init__.py +45 -0
- phenoml/agent/types/agent_chat_response.py +33 -0
- phenoml/agent/types/agent_create_request_provider.py +13 -0
- phenoml/agent/types/agent_create_request_provider_item.py +7 -0
- phenoml/agent/types/agent_delete_response.py +20 -0
- phenoml/agent/types/agent_fhir_config.py +31 -0
- phenoml/agent/types/agent_list_response.py +22 -0
- phenoml/agent/types/agent_prompts_response.py +22 -0
- phenoml/agent/types/agent_response.py +22 -0
- phenoml/agent/types/agent_template.py +56 -0
- phenoml/agent/types/agent_template_provider.py +13 -0
- phenoml/agent/types/agent_template_provider_item.py +5 -0
- phenoml/agent/types/agent_update_request_provider.py +13 -0
- phenoml/agent/types/agent_update_request_provider_item.py +7 -0
- phenoml/agent/types/chat_fhir_client_config.py +31 -0
- phenoml/agent/types/json_patch.py +7 -0
- phenoml/agent/types/json_patch_operation.py +36 -0
- phenoml/agent/types/json_patch_operation_op.py +5 -0
- phenoml/agent/types/prompt_template.py +52 -0
- phenoml/agent/types/success_response.py +20 -0
- phenoml/authtoken/__init__.py +17 -0
- phenoml/authtoken/auth/__init__.py +7 -0
- phenoml/authtoken/auth/client.py +129 -0
- phenoml/authtoken/auth/raw_client.py +173 -0
- phenoml/authtoken/auth/types/__init__.py +7 -0
- phenoml/authtoken/auth/types/auth_generate_token_response.py +22 -0
- phenoml/authtoken/client.py +39 -0
- phenoml/authtoken/errors/__init__.py +8 -0
- phenoml/authtoken/errors/bad_request_error.py +10 -0
- phenoml/authtoken/errors/unauthorized_error.py +10 -0
- phenoml/authtoken/raw_client.py +13 -0
- phenoml/authtoken/types/__init__.py +8 -0
- phenoml/authtoken/types/bad_request_error_body.py +21 -0
- phenoml/authtoken/types/unauthorized_error_body.py +21 -0
- phenoml/client.py +168 -0
- phenoml/cohort/__init__.py +8 -0
- phenoml/cohort/client.py +113 -0
- phenoml/cohort/errors/__init__.py +9 -0
- phenoml/cohort/errors/bad_request_error.py +10 -0
- phenoml/cohort/errors/internal_server_error.py +10 -0
- phenoml/cohort/errors/unauthorized_error.py +10 -0
- phenoml/cohort/raw_client.py +185 -0
- phenoml/cohort/types/__init__.py +8 -0
- phenoml/cohort/types/cohort_response.py +33 -0
- phenoml/cohort/types/search_concept.py +37 -0
- phenoml/construe/__init__.py +45 -0
- phenoml/construe/client.py +399 -0
- phenoml/construe/errors/__init__.py +11 -0
- phenoml/construe/errors/bad_request_error.py +10 -0
- phenoml/construe/errors/conflict_error.py +10 -0
- phenoml/construe/errors/failed_dependency_error.py +10 -0
- phenoml/construe/errors/internal_server_error.py +10 -0
- phenoml/construe/errors/unauthorized_error.py +10 -0
- phenoml/construe/raw_client.py +706 -0
- phenoml/construe/types/__init__.py +41 -0
- phenoml/construe/types/bad_request_error_body.py +27 -0
- phenoml/construe/types/construe_cohort_request_config.py +37 -0
- phenoml/construe/types/construe_cohort_response.py +33 -0
- phenoml/construe/types/construe_cohort_response_queries_item.py +49 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item.py +31 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item_codes_item.py +32 -0
- phenoml/construe/types/construe_upload_code_system_response.py +19 -0
- phenoml/construe/types/extract_codes_result.py +22 -0
- phenoml/construe/types/extract_request_config.py +23 -0
- phenoml/construe/types/extract_request_config_chunking_method.py +5 -0
- phenoml/construe/types/extract_request_system.py +37 -0
- phenoml/construe/types/extracted_code_result.py +41 -0
- phenoml/construe/types/internal_server_error_body.py +27 -0
- phenoml/construe/types/unauthorized_error_body.py +27 -0
- phenoml/construe/types/upload_request_format.py +5 -0
- phenoml/core/__init__.py +52 -0
- phenoml/core/api_error.py +23 -0
- phenoml/core/client_wrapper.py +85 -0
- phenoml/core/datetime_utils.py +28 -0
- phenoml/core/file.py +67 -0
- phenoml/core/force_multipart.py +16 -0
- phenoml/core/http_client.py +543 -0
- phenoml/core/http_response.py +55 -0
- phenoml/core/jsonable_encoder.py +100 -0
- phenoml/core/pydantic_utilities.py +255 -0
- phenoml/core/query_encoder.py +58 -0
- phenoml/core/remove_none_from_dict.py +11 -0
- phenoml/core/request_options.py +35 -0
- phenoml/core/serialization.py +276 -0
- phenoml/environment.py +7 -0
- phenoml/lang2fhir/__init__.py +27 -0
- phenoml/lang2fhir/client.py +430 -0
- phenoml/lang2fhir/errors/__init__.py +11 -0
- phenoml/lang2fhir/errors/bad_request_error.py +10 -0
- phenoml/lang2fhir/errors/failed_dependency_error.py +10 -0
- phenoml/lang2fhir/errors/forbidden_error.py +10 -0
- phenoml/lang2fhir/errors/internal_server_error.py +10 -0
- phenoml/lang2fhir/errors/unauthorized_error.py +10 -0
- phenoml/lang2fhir/raw_client.py +788 -0
- phenoml/lang2fhir/types/__init__.py +19 -0
- phenoml/lang2fhir/types/create_request_resource.py +25 -0
- phenoml/lang2fhir/types/document_request_file_type.py +7 -0
- phenoml/lang2fhir/types/document_request_resource.py +5 -0
- phenoml/lang2fhir/types/fhir_resource.py +5 -0
- phenoml/lang2fhir/types/lang2fhir_upload_profile_response.py +23 -0
- phenoml/lang2fhir/types/search_response.py +33 -0
- phenoml/py.typed +0 -0
- phenoml/tools/__init__.py +33 -0
- phenoml/tools/client.py +392 -0
- phenoml/tools/errors/__init__.py +11 -0
- phenoml/tools/errors/bad_request_error.py +10 -0
- phenoml/tools/errors/failed_dependency_error.py +10 -0
- phenoml/tools/errors/forbidden_error.py +10 -0
- phenoml/tools/errors/internal_server_error.py +10 -0
- phenoml/tools/errors/unauthorized_error.py +10 -0
- phenoml/tools/raw_client.py +745 -0
- phenoml/tools/types/__init__.py +25 -0
- phenoml/tools/types/cohort_request_provider.py +5 -0
- phenoml/tools/types/cohort_response.py +49 -0
- phenoml/tools/types/fhir_client_config.py +31 -0
- phenoml/tools/types/lang2fhir_and_create_request_provider.py +7 -0
- phenoml/tools/types/lang2fhir_and_create_request_resource.py +25 -0
- phenoml/tools/types/lang2fhir_and_create_response.py +33 -0
- phenoml/tools/types/lang2fhir_and_search_request_provider.py +7 -0
- phenoml/tools/types/lang2fhir_and_search_response.py +40 -0
- phenoml/tools/types/search_concept.py +41 -0
- phenoml/version.py +3 -0
- phenoml/wrapper_client.py +123 -0
- phenoml-0.0.1.dist-info/LICENSE +21 -0
- phenoml-0.0.1.dist-info/METADATA +192 -0
- phenoml-0.0.1.dist-info/RECORD +143 -0
- phenoml-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .agent_chat_response import AgentChatResponse
|
|
6
|
+
from .agent_create_request_provider import AgentCreateRequestProvider
|
|
7
|
+
from .agent_create_request_provider_item import AgentCreateRequestProviderItem
|
|
8
|
+
from .agent_delete_response import AgentDeleteResponse
|
|
9
|
+
from .agent_fhir_config import AgentFhirConfig
|
|
10
|
+
from .agent_list_response import AgentListResponse
|
|
11
|
+
from .agent_prompts_response import AgentPromptsResponse
|
|
12
|
+
from .agent_response import AgentResponse
|
|
13
|
+
from .agent_template import AgentTemplate
|
|
14
|
+
from .agent_template_provider import AgentTemplateProvider
|
|
15
|
+
from .agent_template_provider_item import AgentTemplateProviderItem
|
|
16
|
+
from .agent_update_request_provider import AgentUpdateRequestProvider
|
|
17
|
+
from .agent_update_request_provider_item import AgentUpdateRequestProviderItem
|
|
18
|
+
from .chat_fhir_client_config import ChatFhirClientConfig
|
|
19
|
+
from .json_patch import JsonPatch
|
|
20
|
+
from .json_patch_operation import JsonPatchOperation
|
|
21
|
+
from .json_patch_operation_op import JsonPatchOperationOp
|
|
22
|
+
from .prompt_template import PromptTemplate
|
|
23
|
+
from .success_response import SuccessResponse
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"AgentChatResponse",
|
|
27
|
+
"AgentCreateRequestProvider",
|
|
28
|
+
"AgentCreateRequestProviderItem",
|
|
29
|
+
"AgentDeleteResponse",
|
|
30
|
+
"AgentFhirConfig",
|
|
31
|
+
"AgentListResponse",
|
|
32
|
+
"AgentPromptsResponse",
|
|
33
|
+
"AgentResponse",
|
|
34
|
+
"AgentTemplate",
|
|
35
|
+
"AgentTemplateProvider",
|
|
36
|
+
"AgentTemplateProviderItem",
|
|
37
|
+
"AgentUpdateRequestProvider",
|
|
38
|
+
"AgentUpdateRequestProviderItem",
|
|
39
|
+
"ChatFhirClientConfig",
|
|
40
|
+
"JsonPatch",
|
|
41
|
+
"JsonPatchOperation",
|
|
42
|
+
"JsonPatchOperationOp",
|
|
43
|
+
"PromptTemplate",
|
|
44
|
+
"SuccessResponse",
|
|
45
|
+
]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AgentChatResponse(UniversalBaseModel):
|
|
10
|
+
response: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
Agent's response
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
success: typing.Optional[bool] = None
|
|
16
|
+
message: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Status message
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
session_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
Chat session ID
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
if IS_PYDANTIC_V2:
|
|
27
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
+
else:
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .agent_create_request_provider_item import AgentCreateRequestProviderItem
|
|
6
|
+
|
|
7
|
+
AgentCreateRequestProvider = typing.Union[
|
|
8
|
+
typing.Literal["medplum"],
|
|
9
|
+
typing.Literal["google_healthcare"],
|
|
10
|
+
typing.Literal["canvas"],
|
|
11
|
+
typing.Literal["hapi"],
|
|
12
|
+
typing.List[AgentCreateRequestProviderItem],
|
|
13
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AgentDeleteResponse(UniversalBaseModel):
|
|
10
|
+
success: typing.Optional[bool] = None
|
|
11
|
+
message: typing.Optional[str] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AgentFhirConfig(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Agent-specific FHIR configuration (excludes user-specific fields)
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
fhir_store_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
FHIR store ID for Google Healthcare provider
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
instance_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Instance name for multi-instance providers
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
if IS_PYDANTIC_V2:
|
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
|
+
else:
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
frozen = True
|
|
30
|
+
smart_union = True
|
|
31
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .agent_template import AgentTemplate
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AgentListResponse(UniversalBaseModel):
|
|
11
|
+
success: typing.Optional[bool] = None
|
|
12
|
+
message: typing.Optional[str] = None
|
|
13
|
+
agents: typing.Optional[typing.List[AgentTemplate]] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .prompt_template import PromptTemplate
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AgentPromptsResponse(UniversalBaseModel):
|
|
11
|
+
success: typing.Optional[bool] = None
|
|
12
|
+
message: typing.Optional[str] = None
|
|
13
|
+
data: typing.Optional[PromptTemplate] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .agent_template import AgentTemplate
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class AgentResponse(UniversalBaseModel):
|
|
11
|
+
success: typing.Optional[bool] = None
|
|
12
|
+
message: typing.Optional[str] = None
|
|
13
|
+
data: typing.Optional[AgentTemplate] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
from .agent_fhir_config import AgentFhirConfig
|
|
8
|
+
from .agent_template_provider import AgentTemplateProvider
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AgentTemplate(UniversalBaseModel):
|
|
12
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
13
|
+
"""
|
|
14
|
+
Agent ID
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
18
|
+
"""
|
|
19
|
+
Agent name
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
23
|
+
"""
|
|
24
|
+
Agent description
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
prompts: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
Array of prompt IDs used by this agent
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
is_active: typing.Optional[bool] = pydantic.Field(default=None)
|
|
33
|
+
"""
|
|
34
|
+
Whether the agent is active
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
38
|
+
"""
|
|
39
|
+
Tags for categorizing the agent
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
provider: typing.Optional[AgentTemplateProvider] = pydantic.Field(default=None)
|
|
43
|
+
"""
|
|
44
|
+
FHIR provider type - can be a single provider or array of providers
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
meta: typing.Optional[AgentFhirConfig] = None
|
|
48
|
+
|
|
49
|
+
if IS_PYDANTIC_V2:
|
|
50
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
51
|
+
else:
|
|
52
|
+
|
|
53
|
+
class Config:
|
|
54
|
+
frozen = True
|
|
55
|
+
smart_union = True
|
|
56
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .agent_template_provider_item import AgentTemplateProviderItem
|
|
6
|
+
|
|
7
|
+
AgentTemplateProvider = typing.Union[
|
|
8
|
+
typing.Literal["medplum"],
|
|
9
|
+
typing.Literal["google_healthcare"],
|
|
10
|
+
typing.Literal["canvas"],
|
|
11
|
+
typing.Literal["hapi"],
|
|
12
|
+
typing.List[AgentTemplateProviderItem],
|
|
13
|
+
]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .agent_update_request_provider_item import AgentUpdateRequestProviderItem
|
|
6
|
+
|
|
7
|
+
AgentUpdateRequestProvider = typing.Union[
|
|
8
|
+
typing.Literal["medplum"],
|
|
9
|
+
typing.Literal["google_healthcare"],
|
|
10
|
+
typing.Literal["canvas"],
|
|
11
|
+
typing.Literal["hapi"],
|
|
12
|
+
typing.List[AgentUpdateRequestProviderItem],
|
|
13
|
+
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ChatFhirClientConfig(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
User-specific FHIR configuration overrides for chat requests
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
on_behalf_of_email: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
+
"""
|
|
16
|
+
Override email for On-Behalf-Of requests (Medplum only)
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
instance_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Override instance name for multi-instance providers
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
if IS_PYDANTIC_V2:
|
|
25
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
|
+
else:
|
|
27
|
+
|
|
28
|
+
class Config:
|
|
29
|
+
frozen = True
|
|
30
|
+
smart_union = True
|
|
31
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
8
|
+
from ...core.serialization import FieldMetadata
|
|
9
|
+
from .json_patch_operation_op import JsonPatchOperationOp
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class JsonPatchOperation(UniversalBaseModel):
|
|
13
|
+
op: JsonPatchOperationOp = pydantic.Field()
|
|
14
|
+
"""
|
|
15
|
+
The operation to be performed
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
path: str = pydantic.Field()
|
|
19
|
+
"""
|
|
20
|
+
A JSON Pointer string specifying a location within the target document
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
value: typing.Optional[typing.Optional[typing.Any]] = None
|
|
24
|
+
from_: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="from")] = pydantic.Field(default=None)
|
|
25
|
+
"""
|
|
26
|
+
A JSON Pointer string specifying the location in the target document to move the value from (used with move and copy operations)
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
if IS_PYDANTIC_V2:
|
|
30
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
31
|
+
else:
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
frozen = True
|
|
35
|
+
smart_union = True
|
|
36
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PromptTemplate(UniversalBaseModel):
|
|
10
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
Prompt ID
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Prompt name
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
Prompt description
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
content: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
Prompt content
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
is_default: typing.Optional[bool] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Whether this is a default prompt
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
is_active: typing.Optional[bool] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
Whether the prompt is active
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
Tags for categorizing the prompt
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
if IS_PYDANTIC_V2:
|
|
46
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
47
|
+
else:
|
|
48
|
+
|
|
49
|
+
class Config:
|
|
50
|
+
frozen = True
|
|
51
|
+
smart_union = True
|
|
52
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SuccessResponse(UniversalBaseModel):
|
|
10
|
+
success: typing.Optional[bool] = None
|
|
11
|
+
message: typing.Optional[str] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .types import BadRequestErrorBody, UnauthorizedErrorBody
|
|
6
|
+
from .errors import BadRequestError, UnauthorizedError
|
|
7
|
+
from . import auth
|
|
8
|
+
from .auth import AuthGenerateTokenResponse
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"AuthGenerateTokenResponse",
|
|
12
|
+
"BadRequestError",
|
|
13
|
+
"BadRequestErrorBody",
|
|
14
|
+
"UnauthorizedError",
|
|
15
|
+
"UnauthorizedErrorBody",
|
|
16
|
+
"auth",
|
|
17
|
+
]
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ...core.request_options import RequestOptions
|
|
7
|
+
from .raw_client import AsyncRawAuthClient, RawAuthClient
|
|
8
|
+
from .types.auth_generate_token_response import AuthGenerateTokenResponse
|
|
9
|
+
|
|
10
|
+
# this is used as the default value for optional parameters
|
|
11
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AuthClient:
|
|
15
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
16
|
+
self._raw_client = RawAuthClient(client_wrapper=client_wrapper)
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def with_raw_response(self) -> RawAuthClient:
|
|
20
|
+
"""
|
|
21
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
22
|
+
|
|
23
|
+
Returns
|
|
24
|
+
-------
|
|
25
|
+
RawAuthClient
|
|
26
|
+
"""
|
|
27
|
+
return self._raw_client
|
|
28
|
+
|
|
29
|
+
def generate_token(
|
|
30
|
+
self, *, username: str, password: str, request_options: typing.Optional[RequestOptions] = None
|
|
31
|
+
) -> AuthGenerateTokenResponse:
|
|
32
|
+
"""
|
|
33
|
+
Obtain an access token using client credentials
|
|
34
|
+
|
|
35
|
+
Parameters
|
|
36
|
+
----------
|
|
37
|
+
username : str
|
|
38
|
+
The user's username or email
|
|
39
|
+
|
|
40
|
+
password : str
|
|
41
|
+
The user's password
|
|
42
|
+
|
|
43
|
+
request_options : typing.Optional[RequestOptions]
|
|
44
|
+
Request-specific configuration.
|
|
45
|
+
|
|
46
|
+
Returns
|
|
47
|
+
-------
|
|
48
|
+
AuthGenerateTokenResponse
|
|
49
|
+
Successfully generated token
|
|
50
|
+
|
|
51
|
+
Examples
|
|
52
|
+
--------
|
|
53
|
+
from phenoml import phenoml
|
|
54
|
+
|
|
55
|
+
client = phenoml(
|
|
56
|
+
token="YOUR_TOKEN",
|
|
57
|
+
)
|
|
58
|
+
client.authtoken.auth.generate_token(
|
|
59
|
+
username="username",
|
|
60
|
+
password="password",
|
|
61
|
+
)
|
|
62
|
+
"""
|
|
63
|
+
_response = self._raw_client.generate_token(
|
|
64
|
+
username=username, password=password, request_options=request_options
|
|
65
|
+
)
|
|
66
|
+
return _response.data
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class AsyncAuthClient:
|
|
70
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
71
|
+
self._raw_client = AsyncRawAuthClient(client_wrapper=client_wrapper)
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def with_raw_response(self) -> AsyncRawAuthClient:
|
|
75
|
+
"""
|
|
76
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
77
|
+
|
|
78
|
+
Returns
|
|
79
|
+
-------
|
|
80
|
+
AsyncRawAuthClient
|
|
81
|
+
"""
|
|
82
|
+
return self._raw_client
|
|
83
|
+
|
|
84
|
+
async def generate_token(
|
|
85
|
+
self, *, username: str, password: str, request_options: typing.Optional[RequestOptions] = None
|
|
86
|
+
) -> AuthGenerateTokenResponse:
|
|
87
|
+
"""
|
|
88
|
+
Obtain an access token using client credentials
|
|
89
|
+
|
|
90
|
+
Parameters
|
|
91
|
+
----------
|
|
92
|
+
username : str
|
|
93
|
+
The user's username or email
|
|
94
|
+
|
|
95
|
+
password : str
|
|
96
|
+
The user's password
|
|
97
|
+
|
|
98
|
+
request_options : typing.Optional[RequestOptions]
|
|
99
|
+
Request-specific configuration.
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
-------
|
|
103
|
+
AuthGenerateTokenResponse
|
|
104
|
+
Successfully generated token
|
|
105
|
+
|
|
106
|
+
Examples
|
|
107
|
+
--------
|
|
108
|
+
import asyncio
|
|
109
|
+
|
|
110
|
+
from phenoml import Asyncphenoml
|
|
111
|
+
|
|
112
|
+
client = Asyncphenoml(
|
|
113
|
+
token="YOUR_TOKEN",
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
async def main() -> None:
|
|
118
|
+
await client.authtoken.auth.generate_token(
|
|
119
|
+
username="username",
|
|
120
|
+
password="password",
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
asyncio.run(main())
|
|
125
|
+
"""
|
|
126
|
+
_response = await self._raw_client.generate_token(
|
|
127
|
+
username=username, password=password, request_options=request_options
|
|
128
|
+
)
|
|
129
|
+
return _response.data
|