com.l1fe.forge:forge-generate
Kotlin/JVM forge-generate module.
Kotlin/JVM forge-generate module.
Package contract
| Field | Value |
|---|---|
| Language | kotlin |
| Source version | 0.1.0 |
| Manifest | forge-kt/forge-generate/build.gradle.kts |
| Source files | 4 |
| Evidence | Source reference; registry publication and runtime conformance are separate checks |
Import boundary
import com.l1fe.forge.generate.*Use a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.
Source reference
Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.
com/l1fe/forge/generate/GenerateObject.kt
Read declaration text · 4 declaration entries
public data class GenerateObjectResult(
val jsonElement: JsonElement,
val rawText: String,
val result: GenerateResult,
)
/**
* Configuration for a [generateObject] call.
*
* @property model The provider reference.
* @property messages The conversation history.
* @property schema The JSON Schema that the output must conform to.
* @property options Generation configuration (output schema is set automatically).
* @property system Optional system prompt.
*/
public data class GenerateObjectParams(
val model: ProviderRef,
val messages: List<ModelMessage>,
val schema: JsonSchema,
val options: GenerateOptions;
public data class GenerateObjectParams(
val model: ProviderRef,
val messages: List<ModelMessage>,
val schema: JsonSchema,
val options: GenerateOptions;
public suspend fun generateObject(
params: GenerateObjectParams,
registry: ProviderRegistry,
telemetry: TelemetryEmitter;
public suspend fun generateObject(
model: LanguageModel,
messages: List<ModelMessage>,
schema: JsonSchema,
options: GenerateOptions;com/l1fe/forge/generate/GenerateText.kt
Read declaration text · 3 declaration entries
public data class GenerateTextParams(
val model: ProviderRef,
val messages: List<ModelMessage>,
val tools: List<ToolDefinition>;
public suspend fun generateText(
params: GenerateTextParams,
registry: ProviderRegistry,
telemetry: TelemetryEmitter;
public suspend fun generateText(
model: LanguageModel,
messages: List<ModelMessage>,
tools: List<ToolDefinition>;com/l1fe/forge/generate/StreamObject.kt
Read declaration text · 7 declaration entries
public sealed class ObjectStreamChunk
public data class Partial(
val textDelta: String,
val accumulatedText: String,
) : ObjectStreamChunk()
/**
* The stream is complete and the final JSON object has been parsed and validated.
*
* @property jsonElement The parsed JSON element.
* @property rawText The complete raw text.
*/
public data class Complete(
val jsonElement: JsonElement,
val rawText: String,
) : ObjectStreamChunk()
/**
* The stream encountered an error.
*
* @property error The error that occurred.
*/
public data class Error(
val error: ForgeError,
) : ObjectStreamChunk()
}
public data class Complete(
val jsonElement: JsonElement,
val rawText: String,
) : ObjectStreamChunk()
/**
* The stream encountered an error.
*
* @property error The error that occurred.
*/
public data class Error(
val error: ForgeError,
) : ObjectStreamChunk()
}
/**
* Configuration for a [streamObject] call.
*
* @property model The provider reference.
* @property messages The conversation history.
* @property schema The JSON Schema that the output must conform to.
* @property options Generation configuration.
* @property system Optional system prompt.
*/
public data class StreamObjectParams(
val model: ProviderRef,
public data class Error(
val error: ForgeError,
) : ObjectStreamChunk()
}
/**
* Configuration for a [streamObject] call.
*
* @property model The provider reference.
* @property messages The conversation history.
* @property schema The JSON Schema that the output must conform to.
* @property options Generation configuration.
* @property system Optional system prompt.
*/
public data class StreamObjectParams(
val model: ProviderRef,
val messages: List<ModelMessage>,
val schema: JsonSchema,
val options: GenerateOptions;
public data class StreamObjectParams(
val model: ProviderRef,
val messages: List<ModelMessage>,
val schema: JsonSchema,
val options: GenerateOptions;
public suspend fun streamObject(
params: StreamObjectParams,
registry: ProviderRegistry,
telemetry: TelemetryEmitter;
public suspend fun streamObject(
model: LanguageModel,
messages: List<ModelMessage>,
schema: JsonSchema,
options: GenerateOptions;com/l1fe/forge/generate/StreamText.kt
Read declaration text · 3 declaration entries
public data class StreamTextParams(
val model: ProviderRef,
val messages: List<ModelMessage>,
val tools: List<ToolDefinition>;
public suspend fun streamText(
params: StreamTextParams,
registry: ProviderRegistry,
telemetry: TelemetryEmitter;
public suspend fun streamText(
model: LanguageModel,
messages: List<ModelMessage>,
tools: List<ToolDefinition>;