class LLM::General

Overview

General OpenAI-compatible LLM client

Defined in:

llm/general/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(url : String, model : String, api_key : String | Nil) #

[View source]

Instance Method Detail

def request(prompt : String, format : String = "json") #

Make a simple request with a single prompt


[View source]
def request_messages(messages : Array(Hash(String, String)), format : String = "json") #

Make a request with chat-style messages


[View source]