|
|
@@ -353,6 +353,10 @@ import type {
|
|
|
V2SessionQuestionRejectResponses,
|
|
|
V2SessionQuestionReplyErrors,
|
|
|
V2SessionQuestionReplyResponses,
|
|
|
+ V2SessionSwitchAgentErrors,
|
|
|
+ V2SessionSwitchAgentResponses,
|
|
|
+ V2SessionSwitchModelErrors,
|
|
|
+ V2SessionSwitchModelResponses,
|
|
|
V2SessionWaitErrors,
|
|
|
V2SessionWaitResponses,
|
|
|
V2SkillListErrors,
|
|
|
@@ -5337,6 +5341,88 @@ export class Session3 extends HeyApiClient {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Switch session agent
|
|
|
+ *
|
|
|
+ * Switch the agent used by subsequent session activity.
|
|
|
+ */
|
|
|
+ public switchAgent<ThrowOnError extends boolean = false>(
|
|
|
+ parameters: {
|
|
|
+ sessionID: string
|
|
|
+ agent?: string
|
|
|
+ },
|
|
|
+ options?: Options<never, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ const params = buildClientParams(
|
|
|
+ [parameters],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ args: [
|
|
|
+ { in: "path", key: "sessionID" },
|
|
|
+ { in: "body", key: "agent" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ return (options?.client ?? this.client).post<
|
|
|
+ V2SessionSwitchAgentResponses,
|
|
|
+ V2SessionSwitchAgentErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
+ url: "/api/session/{sessionID}/agent",
|
|
|
+ ...options,
|
|
|
+ ...params,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ ...options?.headers,
|
|
|
+ ...params.headers,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Switch session model
|
|
|
+ *
|
|
|
+ * Switch the model used by subsequent session activity.
|
|
|
+ */
|
|
|
+ public switchModel<ThrowOnError extends boolean = false>(
|
|
|
+ parameters: {
|
|
|
+ sessionID: string
|
|
|
+ model?: {
|
|
|
+ id: string
|
|
|
+ providerID: string
|
|
|
+ variant?: string
|
|
|
+ }
|
|
|
+ },
|
|
|
+ options?: Options<never, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ const params = buildClientParams(
|
|
|
+ [parameters],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ args: [
|
|
|
+ { in: "path", key: "sessionID" },
|
|
|
+ { in: "body", key: "model" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ return (options?.client ?? this.client).post<
|
|
|
+ V2SessionSwitchModelResponses,
|
|
|
+ V2SessionSwitchModelErrors,
|
|
|
+ ThrowOnError
|
|
|
+ >({
|
|
|
+ url: "/api/session/{sessionID}/model",
|
|
|
+ ...options,
|
|
|
+ ...params,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ ...options?.headers,
|
|
|
+ ...params.headers,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Send message
|
|
|
*
|