질문
객체나 딕셔너리를 사용하여 상태를 제공하고 예/아니오, 선택, 점수 질문을 합니다.
상태
state는 질문하려는 텍스트나 JSON 객체입니다. None일 수는 없지만, 객체 내부의 값은 None일 수 있습니다.
질문 객체
이름 있는 인수로 질문을 정의하려면 Noul, Choice, Score를 사용하십시오.
typesafe_sdk.NoulCriteria
상속: TypedDict
예와 아니오 결과에 대한 선택적 설명입니다.
자세한 내용은 noul 프리미티브를 참조하십시오.
true
instance-attribute
true: JSONContent | None
예 결과에 대한 설명으로, 텍스트, JSON 객체, 배열일 수 있습니다. None이면 설명하지 않습니다.
false
instance-attribute
false: JSONContent | None
아니오 결과에 대한 설명으로, 텍스트, JSON 객체, 배열일 수 있습니다. None이면 설명하지 않습니다.
typesafe_sdk.Noul
pydantic-model
상속: _Question, wire.NoulQuestion
두 결과에 대한 선택적 설명을 가진 예/아니오 질문입니다.
자세한 내용은 noul 프리미티브를 참조하십시오.
필드:
instructions
pydantic-field
instructions: JSONContent | None = None
질문할 내용으로, 텍스트, JSON 객체, 배열로 표현합니다. 선택 사항입니다.
criteria
pydantic-field
criteria: NoulCriteria | None = None
두 결과에 대한 선택적 설명입니다.
typesafe_sdk.Choice
pydantic-model
상속: _Question, wire.ChoiceQuestion
이름 있는 대안 중에서 선택하는 질문입니다.
자세한 내용은 choice 프리미티브를 참조하십시오.
필드:
criteria
pydantic-field
criteria: Mapping[str, JSONContent | None]
텍스트, 객체, 배열 설명에 매핑된 레이블, 설명이 없으면 None입니다.
instructions
pydantic-field
instructions: JSONContent | None = None
질문할 내용으로, 텍스트, JSON 객체, 배열로 표현합니다. 선택 사항입니다.
typesafe_sdk.Score
pydantic-model
상속: _Question, wire.ScoreQuestion
정렬된 루브릭을 사용하여 점수를 부여하는 질문입니다.
자세한 내용은 score 프리미티브를 참조하십시오.
필드:
criteria
pydantic-field
criteria: Sequence[JSONContent]
텍스트, 객체, 배열 설명의 비어 있지 않은 정렬된 리스트로, 0부터 점수마다 하나씩입니다.
instructions
pydantic-field
instructions: JSONContent | None = None
질문할 내용으로, 텍스트, JSON 객체, 배열로 표현합니다. 선택 사항입니다.
typesafe_sdk.Question
module-attribute
Question: TypeAlias = (
Noul | Choice | Score | QuestionModel
)
질문 객체 또는 질문 딕셔너리입니다.
typesafe_sdk.Questions
module-attribute
Questions: TypeAlias = Mapping[str, Question]
답변을 식별하는 데 사용하는 이름으로 키를 지정한 질문 입력입니다.
질문 딕셔너리
질문 딕셔너리에는 type 키가 있습니다: "noul", "choice", "score". 같은 요청에서 딕셔너리와 질문 객체를 섞을 수 있습니다.
typesafe_sdk.NoulModel
상속: TypedDict
type="noul"인 예/아니오 질문 딕셔너리입니다.
자세한 내용은 noul 프리미티브를 참조하십시오.
type
instance-attribute
type: Literal['noul']
instructions
instance-attribute
instructions: NotRequired[JSONContent | None]
질문할 내용으로, 텍스트, JSON 객체, 배열로 표현합니다. 선택 사항입니다.
criteria
instance-attribute
criteria: NotRequired[NoulCriteria | None]
두 결과에 대한 선택적 설명입니다.
typesafe_sdk.ChoiceModel
상속: TypedDict
type="choice"인 선택 질문 딕셔너리입니다.
자세한 내용은 choice 프리미티브를 참조하십시오.
type
instance-attribute
type: Literal['choice']
instructions
instance-attribute
instructions: NotRequired[JSONContent | None]
질문할 내용으로, 텍스트, JSON 객체, 배열로 표현합니다. 선택 사항입니다.
criteria
instance-attribute
criteria: Mapping[str, JSONContent | None]
텍스트, 객체, 배열 설명에 매핑된 레이블, 설명이 없으면 None입니다.
typesafe_sdk.ScoreModel
상속: TypedDict
type="score"인 점수 질문 딕셔너리입니다.
자세한 내용은 score 프리미티브를 참조하십시오.
type
instance-attribute
type: Literal['score']
instructions
instance-attribute
instructions: NotRequired[JSONContent | None]
질문할 내용으로, 텍스트, JSON 객체, 배열로 표현합니다. 선택 사항입니다.
criteria
instance-attribute
criteria: Sequence[JSONContent]
텍스트, 객체, 배열 설명의 비어 있지 않은 정렬된 리스트로, 0부터 점수마다 하나씩입니다.
typesafe_sdk.QuestionModel
module-attribute
QuestionModel: TypeAlias = (
NoulModel | ChoiceModel | ScoreModel
)
type 키로 식별되는 질문 딕셔너리입니다.