Package-level declarations

Types

Link copied to clipboard
class ApiVersion : AbstractValue<String>
Link copied to clipboard
interface AzureAI

Docs: https://learn.microsoft.com/en-us/azure/ai-studio/reference

Link copied to clipboard
interface AzureAIAction<R> : Action<Result<R, RemoteFailure>>
Link copied to clipboard
typealias AzureAIApiKey = ApiKey
Link copied to clipboard
@KotshiJsonAdapterFactory
object AzureAIJsonAdapterFactory : JsonAdapter.Factory
Link copied to clipboard
object AzureAIMoshi : ConfigurableMoshi
Link copied to clipboard
class AzureHost : AbstractValue<String>
Link copied to clipboard
class AzureResource : AbstractValue<String>
Link copied to clipboard
typealias CompletionId = ResponseId
Link copied to clipboard
class Deployment : AbstractValue<String>
Link copied to clipboard
Link copied to clipboard
typealias GitHubToken = ApiKey
Link copied to clipboard
class ModelProvider : AbstractValue<String>
Link copied to clipboard
class ModelType : AbstractValue<String>
Link copied to clipboard
class ObjectId : AbstractValue<String>
Link copied to clipboard
class ObjectType : AbstractValue<String>
Link copied to clipboard
typealias Prompt = UserPrompt
Link copied to clipboard
class Region : AbstractValue<String>
Link copied to clipboard
class TokenId : AbstractValue<String>
Link copied to clipboard
class User : AbstractValue<String>

Properties

Link copied to clipboard
val StopReason.Companion.content_filter: StopReason
Link copied to clipboard
val StopReason.Companion.length: StopReason
Link copied to clipboard
val StopReason.Companion.stop: StopReason
Link copied to clipboard
val StopReason.Companion.tool_calls: StopReason

Functions

Link copied to clipboard
fun AzureAI.chatCompletion(model: ModelName, messages: List<Message>, max_tokens: Int, stream: Boolean): Result<Sequence<CompletionResponse>, RemoteFailure>
fun AzureAI.chatCompletion(model: ModelName, message: Message, max_tokens: Int, stream: Boolean): Result<Sequence<CompletionResponse>, RemoteFailure>
fun AzureAI.chatCompletion(model: ModelName, messages: List<Message>, max_tokens: Int? = null, temperature: Temperature, top_p: Double, seed: Int, stop: List<String>? = null, presence_penalty: Double, frequency_penalty: Double, user: User? = null, stream: Boolean, response_format: ResponseFormat? = null, tools: List<Tool>? = null, tool_choice: Any? = null, n: Integer? = null): Result<Sequence<CompletionResponse>, RemoteFailure>
Link copied to clipboard
fun AzureAI.completion(prompt: UserPrompt, max_tokens: MaxTokens, stream: Boolean): Result<Sequence<CompletionResponse>, RemoteFailure>
fun AzureAI.completion(prompt: UserPrompt, presence_penalty: Double, frequency_penalty: Double, temperature: Temperature, stream: Boolean, max_tokens: MaxTokens? = null, seed: Integer? = null, stop: List<String>? = null, n: Integer? = null, top_p: Double): Result<Sequence<CompletionResponse>, RemoteFailure>
Link copied to clipboard
fun AzureAI.createEmbeddings(model: ModelName, input: List<String>): Result<Embeddings, RemoteFailure>
Link copied to clipboard
fun AzureAI.getInfo(modelName: ModelName? = null): Result<ModelInfo, RemoteFailure>
Link copied to clipboard
fun AzureAI.Companion.Http(token: ApiKey, http: HttpHandler = JavaHttpClient()): AzureAI

Use this API with GitHubModels

fun AzureAI.Companion.Http(resource: AzureResource, region: Region, token: ApiKey, http: HttpHandler = JavaHttpClient()): AzureAI

Use this API with Azure resources

fun AzureAI.Companion.Http(token: ApiKey, host: AzureHost, region: Region, http: HttpHandler = JavaHttpClient(), apiVersion: ApiVersion = PREVIEW, extraParameters: ExtraParameters? = null, deployment: Deployment? = null): AzureAI