Skip to main content Link Search Menu Expand Document (external link)

AiResponse.ts overview

Since v1.0.0


Exports Grouped by Category


models

AiResponse (class)

Signature

declare class AiResponse

Source

Since v1.0.0

is (static method)

Signature

declare const is: (u: unknown) => u is AiResponse

Source

Since v1.0.0

fromText (static method)

Signature

declare const fromText: (options: { role: AiRole.AiRole; content: string }) => AiResponse

Source

Since v1.0.0

withToolCallsJson (method)

Signature

declare const withToolCallsJson: (
  calls: Iterable<{ readonly id: string; readonly name: string; readonly params: string }>
) => Effect.Effect<AiResponse, AiError>

Source

Since v1.0.0

withToolCallsUnknown (method)

Signature

declare const withToolCallsUnknown: (
  calls: Iterable<{ readonly id: string; readonly name: string; readonly params: unknown }>
) => AiResponse

Source

Since v1.0.0

concat (method)

Signature

declare const concat: (that: AiResponse) => AiResponse

Source

Since v1.0.0

[TypeId] (property)

Signature

readonly [TypeId]: unique symbol

Source

Since v1.0.0

parts

ImageUrlPart (class)

Signature

declare class ImageUrlPart

Source

Since v1.0.0

[PartTypeId] (property)

Signature

readonly [PartTypeId]: unique symbol

Source

Since v1.0.0

Part

Signature

declare const Part: Schema.Union<[typeof TextPart, typeof ToolCallPart, typeof ImageUrlPart]>

Source

Since v1.0.0

Part (type alias)

Signature

type Part = TextPart | ToolCallPart | ImageUrlPart

Source

Since v1.0.0

PartTypeId

Signature

declare const PartTypeId: unique symbol

Source

Since v1.0.0

PartTypeId (type alias)

Signature

type PartTypeId = typeof PartTypeId

Source

Since v1.0.0

TextPart (class)

Signature

declare class TextPart

Source

Since v1.0.0

fromContent (static method)

Signature

declare const fromContent: (content: string) => TextPart

Source

Since v1.0.0

[PartTypeId] (property)

Signature

readonly [PartTypeId]: unique symbol

Source

Since v1.0.0

ToolCallId

Signature

declare const ToolCallId: any

Source

Since v1.0.0

ToolCallId (type alias)

Signature

type ToolCallId = typeof ToolCallId.Type

Source

Since v1.0.0

ToolCallPart (class)

Signature

declare class ToolCallPart

Source

Since v1.0.0

fromJson (static method)

Signature

declare const fromJson: ({
  id,
  name,
  params
}: {
  readonly id: string
  readonly name: string
  readonly params: string
}) => Effect.Effect<ToolCallPart, AiError>

Source

Since v1.0.0

fromUnknown (static method)

Signature

declare const fromUnknown: ({
  id,
  name,
  params
}: {
  readonly id: string
  readonly name: string
  readonly params: unknown
}) => ToolCallPart

Source

Since v1.0.0

[PartTypeId] (property)

Signature

readonly [PartTypeId]: unique symbol

Source

Since v1.0.0

tools

WithResolved (class)

Signature

declare class WithResolved<A>

Source

Since v1.0.0

is (static method)

Signature

declare const is: <A>(u: unknown) => u is WithResolved<A>

Source

Since v1.0.0

concat (method)

Signature

declare const concat: <B>(that: WithResolved<B>) => WithResolved<A | B>

Source

Since v1.0.0

[WithResolvedTypeId] (property)

Signature

readonly [WithResolvedTypeId]: unique symbol

Source

Since v1.0.0

WithResolvedTypeId

Signature

declare const WithResolvedTypeId: unique symbol

Source

Since v1.0.0

WithResolvedTypeId (type alias)

Signature

type WithResolvedTypeId = typeof WithResolvedTypeId

Source

Since v1.0.0

type ids

TypeId

Signature

declare const TypeId: unique symbol

Source

Since v1.0.0

TypeId (type alias)

Signature

type TypeId = typeof TypeId

Source

Since v1.0.0