io.github.quafadas.dairect

Members list

Type members

Experimental classlikes

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class AiResponseFormat(`type`: AiResponseFormatString, json_schema: Option[Document])

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Experimental
true
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait Annotation extends Product, Serializable

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
Self type
object Annotation extends Companion[Annotation]

Attributes

Companion
trait
Experimental
true
Supertypes
trait Sum
trait Mirror
trait Companion[Annotation]
trait Has[Annotation]
trait ShapeTag[Annotation]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
Annotation.type
trait AssistantApi

https://platform.openai.com/docs/api-reference/assistants/createAssistant

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object AssistantApi

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
case class AssistantFileSearch(max_num_results: Option[Long], ranking_options: Option[RankingOptions])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object AssistantMetaData extends Newtype[Map[String, String]]

Attributes

Experimental
true
Supertypes
class Newtype[Map[String, String]]
class AbstractNewtype[Map[String, String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type

Attributes

Experimental
true
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Experimental
true
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class AssistantToolFunction(name: String, parameters: Option[Document], description: Option[String], strict: Option[Boolean])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ChatChunk(id: String, choices: List[ChunkChoice], created: Long, model: String, service_tier: Option[String], system_fingerprint: String, `object`: String, usage: Option[AiTokenUsage])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait ChatGpt

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object ChatGpt

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
ChatGpt.type
case class ChunkChoice(delta: ChunkDelta, finish_reason: Option[String], index: Int)

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ChunkDelta(content: Option[String], tool_calls: Option[List[ToolCall]], role: Option[String], refusal: Option[String])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class CodeInterpreter(file_ids: CodeInterpreterFileIds)

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object CodeInterpreterFileIds extends Newtype[List[String]]

Attributes

Experimental
true
Supertypes
class Newtype[List[String]]
class AbstractNewtype[List[String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
case class Compounds(strings: List[String], mapy: Map[String, String])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object EmbeddingsApi

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
object FileIds extends Newtype[List[String]]

Attributes

Experimental
true
Supertypes
class Newtype[List[String]]
class AbstractNewtype[List[String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
FileIds.type
case class FileSearch(vector_store_ids: Option[VectorStoreIds], vector_stores: Option[VectorStoreIds])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait FilesApi

https://platform.openai.com/docs/api-reference/files

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object FilesApi

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
FilesApi.type
case class FunctionCall(name: String, description: Option[String], arguments: Option[String])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class ImageDetails(file_id: String, detail: Option[String])

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ImageDetails extends Companion[ImageDetails]

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
trait Companion[ImageDetails]
trait Has[ImageDetails]
trait ShapeTag[ImageDetails]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
final case class ImageFile(image_file: ImageDetails)

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ImageFile extends Companion[ImageFile]

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
trait Companion[ImageFile]
trait Has[ImageFile]
trait ShapeTag[ImageFile]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
ImageFile.type
final case class ImageUrl(image_url: ImageUrlDetails)

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ImageUrl extends Companion[ImageUrl]

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
trait Companion[ImageUrl]
trait Has[ImageUrl]
trait ShapeTag[ImageUrl]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
ImageUrl.type
final case class ImageUrlDetails(url: String, detail: Option[String])

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ImageUrlDetails extends Companion[ImageUrlDetails]

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
trait Companion[ImageUrlDetails]
trait Has[ImageUrlDetails]
trait ShapeTag[ImageUrlDetails]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
sealed trait MessageContent extends Product, Serializable

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
Self type
object MessageContent extends Companion[MessageContent]

Attributes

Companion
trait
Experimental
true
Supertypes
trait Sum
trait Mirror
trait Companion[MessageContent]
trait Has[MessageContent]
trait ShapeTag[MessageContent]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
object MessageContentList extends Newtype[List[MessageContent]]

Attributes

Experimental
true
Supertypes
class Newtype[List[MessageContent]]
class AbstractNewtype[List[MessageContent]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
object MessageMetaData extends Newtype[Map[String, String]]

Attributes

Experimental
true
Supertypes
class Newtype[Map[String, String]]
class AbstractNewtype[Map[String, String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
sealed trait MessageOnThread extends Product, Serializable

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class ArrayCase
class StrCase
Self type
object MessageOnThread extends Companion[MessageOnThread]

Attributes

Companion
trait
Experimental
true
Supertypes
trait Sum
trait Mirror
trait Companion[MessageOnThread]
trait Has[MessageOnThread]
trait ShapeTag[MessageOnThread]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
sealed trait MessageToSend extends Product, Serializable

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
Self type
object MessageToSend extends Companion[MessageToSend]

Attributes

Companion
trait
Experimental
true
Supertypes
trait Sum
trait Mirror
trait Companion[MessageToSend]
trait Has[MessageToSend]
trait ShapeTag[MessageToSend]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
object MessageToSendList extends Newtype[List[MessageToSend]]

Attributes

Experimental
true
Supertypes
class Newtype[List[MessageToSend]]
class AbstractNewtype[List[MessageToSend]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
trait MessagesApi

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object MessagesApi

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
case class OpenAiPlatform(chatApi: ChatGpt, assistantApi: AssistantApi, filesApi: FilesApi, vectorStoreApi: VectorStoreApi, vectorStoreFilesApi: VectorStoreFilesApi, runApi: RunApi, runStepsApi: RunStepsApi, threadApi: ThreadApi, messageApi: MessagesApi, authdClient: Client[IO])

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class RankingOptions(ranker: String, score_threshold: Double)

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Experimental
true
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait RunApi

https://platform.openai.com/docs/api-reference/runs

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object RunApi

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
RunApi.type
object RunMetaData extends Newtype[Map[String, String]]

Attributes

Experimental
true
Supertypes
class Newtype[Map[String, String]]
class AbstractNewtype[Map[String, String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
trait RunStepsApi

https://platform.openai.com/docs/api-reference/run-steps/getRunStep

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object RunStepsApi

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
case class StructuredOutput(name: String, description: Option[String], schema: Option[Document], strict: Option[Boolean])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Text(text: TextValue)

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Text extends Companion[Text]

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
trait Companion[Text]
trait Has[Text]
trait ShapeTag[Text]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
Text.type
final case class TextToSend(text: String)

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TextToSend extends Companion[TextToSend]

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
trait Companion[TextToSend]
trait Has[TextToSend]
trait ShapeTag[TextToSend]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
TextToSend.type
final case class TextValue(value: Option[String])

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TextValue extends Companion[TextValue]

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
trait Companion[TextValue]
trait Has[TextValue]
trait ShapeTag[TextValue]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
TextValue.type
trait ThreadApi

https://platform.openai.com/docs/api-reference/assistants/createAssistant

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any
object ThreadApi

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
ThreadApi.type
case class ThreadMessage(content: MessageOnThread, role: ThreadMessageRole, attachments: Option[List[MessageAttachment]], metadata: Option[ThreadMetaData])

Attributes

Companion
object
Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ThreadMessage

Attributes

Companion
class
Experimental
true
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Experimental
true
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ThreadMetaData extends Newtype[Map[String, String]]

Attributes

Experimental
true
Supertypes
class Newtype[Map[String, String]]
class AbstractNewtype[Map[String, String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
case class ToolCall(id: String, `type`: String, function: FunctionCall)

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class ToolResources(code_interpreter: Option[CodeInterpreter], file_search: Option[FileSearch])

Attributes

Experimental
true
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

https://platform.openai.com/docs/api-reference/vector-stores

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
object VectorStoreFileIds extends Newtype[List[String]]

Attributes

Experimental
true
Supertypes
class Newtype[List[String]]
class AbstractNewtype[List[String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type

https://platform.openai.com/docs/api-reference/vector-stores-files

Attributes

Companion
object
Experimental
true
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Experimental
true
Supertypes
class Object
trait Matchable
class Any
Self type
object VectorStoreIds extends Newtype[List[String]]

Attributes

Experimental
true
Supertypes
class Newtype[List[String]]
class AbstractNewtype[List[String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type
object VectorStoreMetaData extends Newtype[Map[String, String]]

Attributes

Experimental
true
Supertypes
class Newtype[Map[String, String]]
class AbstractNewtype[Map[String, String]]
trait HasId
class Object
trait Matchable
class Any
Show all
Self type

Types

type AssistantMetaData = Type
type FileIds = Type
type MessageContentList = Type
type MessageMetaData = Type
type MessageToSendList = Type
type RunMetaData = Type
type ThreadMetaData = Type
type VectorStoreFileIds = Type
type VectorStoreIds = Type
type VectorStoreMetaData = Type

Value members

Experimental methods

def assistWare: () => IO

Attributes

Experimental
true
def authMiddleware(tokResource: Resource[IO, String]): () => IO

Attributes

Experimental
true
def fileLogger(toFile: Path): Client[IO] => Client[IO]

Attributes

Experimental
true
def makeLogFile(toFile: Path): IO[Unit]

Attributes

Experimental
true
def serpWare(tokResource: Resource[IO, String]): () => IO

Attributes

Experimental
true
def streamAssistantEvents(authdClient: Client[IO], req: Request[IO]): Stream[IO, AssistantStreamEvent]

Attributes

Experimental
true

Experimental fields

val filesIo: Files[IO]

Attributes

Experimental
true
val printLogger: Client[IO] => Client[IO]

Attributes

Experimental
true

Extensions

Experimental extensions

extension (c: ChatGpt)
def stream(messages: List[AiMessage], model: String, temperature: Option[Double], tools: Option[Document], response_format: Option[AiResponseFormat], authdClient: Client[IO], baseUrl: String): Stream[IO, String]

Attributes

Experimental
true
def streamRaw(messages: List[AiMessage], model: String, temperature: Option[Double], tools: Option[Document], response_format: Option[AiResponseFormat], authdClient: Client[IO], baseUrl: String): Stream[IO, List[ChatChunk]]

Attributes

Experimental
true
extension (c: RunApi)
def createThreadRunStream(authdClient: Client[IO], assistant_id: String, thread: CreateThread, model: Option[String], instructions: Option[String], additional_instructions: Option[String], tools: Option[List[AssistantTool]], tool_resources: Option[ToolResources], metadata: Option[RunMetaData], temperature: Option[Double], top_p: Option[Double], max_prompt_tokens: Option[Long], max_completion_tokens: Option[Long], truncation_strategy: Option[TruncationStrategy], tool_choice: Option[ToolChoiceInRun], parallel_tool_calls: Option[Boolean], response_format: Option[ResponseFormat], baseUrl: String): Stream[IO, AssistantStreamEvent]

Attributes

Experimental
true
def streamRun(authdClient: Client[IO], thread_id: String, assistant_id: String, model: Option[String], instructions: Option[String], additional_instructions: Option[String], additional_messages: Option[List[ThreadMessage]], tools: Option[List[AssistantTool]], metadata: Option[RunMetaData], temperature: Option[Double], top_p: Option[Double], max_prompt_tokens: Option[Long], max_completion_tokens: Option[Long], truncation_strategy: Option[TruncationStrategy], tool_choice: Option[ToolChoiceInRun], parallel_tool_calls: Option[Boolean], response_format: Option[ResponseFormat], baseUrl: String): Stream[IO, AssistantStreamEvent]

Attributes

Experimental
true
def streamToolOutput(authdClient: Client[IO], thread_id: String, run_id: String, tool_outputs: List[ToolOutput], baseUrl: String): Stream[IO, AssistantStreamEvent]

Attributes

Experimental
true
extension [A](errorOr: Either[PayloadError, A])
def failFast: A

Attributes

Experimental
true
extension (fApi: FilesApi)
def content[F[_] : Files](file: Path, authdClient: Client[IO], file_id: String): Nothing

Attributes

Experimental
true
def upload[F[_] : Files](file: Path, authdClient: Client[IO], purpose: String, baseUrl: String): IO[File]

Attributes

Experimental
true
extension (s: String)
def msg: StrCase

https://platform.openai.com/docs/api-reference/assistants/createAssistant

extension (s: String)
def blob: Blob

Attributes

Experimental
true