From fc91528d89deca95ffa246a01ecfb864d1097f06 Mon Sep 17 00:00:00 2001 From: monofuel Date: Wed, 23 Oct 2024 21:28:03 +0000 Subject: [PATCH] deploy: 86ee75fe009155e50bea836eb9606189c9762cd4 --- index.html | 289 +++++++++++++++++++++++++---------------------- openai_leap.html | 289 +++++++++++++++++++++++++---------------------- openai_leap.idx | 114 ++++++++++--------- theindex.html | 26 +++-- 4 files changed, 388 insertions(+), 330 deletions(-) diff --git a/index.html b/index.html index e0fceee..9e8701a 100644 --- a/index.html +++ b/index.html @@ -175,6 +175,7 @@

src/openai_leap

id*: string created*: int owned_by*: string">OpenAiModel +
  • OpenAIStream
  • src/openai_leap + @@ -330,8 +333,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -345,8 +348,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -373,8 +376,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -389,8 +392,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -404,8 +407,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -419,8 +422,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -432,8 +435,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -444,8 +447,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -456,8 +459,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -469,8 +472,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -481,8 +484,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -492,8 +495,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -507,8 +510,8 @@

    Types

    ChatGPT Message object for chat completions and responses NB. content can be a string or a sequence of MessageContentPart objects, however this cannot be expressed in Nim easily, so we require a sequence of MessageContentPart objects - Source   -Edit   + Source   +Edit  
    @@ -519,8 +522,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -554,8 +557,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -565,8 +568,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -587,8 +590,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -599,8 +602,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -611,8 +614,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -627,8 +630,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -640,8 +643,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -651,8 +654,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -664,6 +667,16 @@

    Types

    + Source   +Edit   + +
    + +
    +
    OpenAIStream = ref object
    +
    + + Source   Edit   @@ -679,8 +692,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -690,8 +703,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -701,8 +714,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -713,8 +726,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -724,8 +737,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -735,8 +748,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -748,8 +761,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -760,8 +773,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -772,8 +785,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -791,8 +804,8 @@

    Procs

    Transcribe audio data. - Source   -Edit   + Source   +Edit  
    @@ -805,8 +818,8 @@

    Procs

    Cancel the fine tune model. - Source   -Edit   + Source   +Edit  
    @@ -818,8 +831,8 @@

    Procs

    Clean up the OpenAPI API client. - Source   -Edit   + Source   +Edit  
    @@ -834,8 +847,8 @@

    Procs

    Create a chat completion. - Source   -Edit   + Source   +Edit  
    @@ -846,8 +859,8 @@

    Procs

    Create a chat completion. without streaming. - Source   -Edit   + Source   +Edit  
    @@ -861,8 +874,8 @@

    Procs

    OpenAI fine tuning format is a jsonl file. At least 10 examples are required. 50 to 100 recommended. For a training file with 100,000 tokens trained over 3 epochs, the expected cost would be ~$2.40 USD. File will take time to process while uploading. Maximum file size is 512MB, but not files that big are not recommended. There is a 100gb limit across an organization. See: https://platform.openai.com/docs/api-reference/files/create - Source   -Edit   + Source   +Edit  
    @@ -876,8 +889,8 @@

    Procs

    Create a fine tune job. - Source   -Edit   + Source   +Edit  
    @@ -890,8 +903,8 @@

    Procs

    Delete a file. - Source   -Edit   + Source   +Edit  
    @@ -904,8 +917,8 @@

    Procs

    Delete the fine tune model. - Source   -Edit   + Source   +Edit  
    @@ -919,8 +932,8 @@

    Procs

    Delete a specific model. - Source   -Edit   + Source   +Edit  
    @@ -935,8 +948,8 @@

    Procs

    Generate embeddings for a list of documents. - Source   -Edit   + Source   +Edit  
    @@ -950,8 +963,8 @@

    Procs

    Get the details of a file. - Source   -Edit   + Source   +Edit  
    @@ -964,8 +977,8 @@

    Procs

    Get the status of the model. - Source   -Edit   + Source   +Edit  
    @@ -979,8 +992,8 @@

    Procs

    Get a specific model. - Source   -Edit   + Source   +Edit  
    @@ -994,8 +1007,8 @@

    Procs

    List all the files. - Source   -Edit   + Source   +Edit  
    @@ -1008,8 +1021,8 @@

    Procs

    List all the checkpoints for the fine tune model. See: https://platform.openai.com/docs/api-reference/fine-tuning/list-checkpoints - Source   -Edit   + Source   +Edit  
    @@ -1023,8 +1036,8 @@

    Procs

    List all the fine tune jobs. - Source   -Edit   + Source   +Edit  
    @@ -1037,8 +1050,8 @@

    Procs

    List all the events for the fine tune model. - Source   -Edit   + Source   +Edit  
    @@ -1052,53 +1065,65 @@

    Procs

    List available models. - Source   -Edit   + Source   +Edit  
    -
    -
    proc newOpenAiApi(baseUrl: string = "https://api.openai.com/v1";
    +  
    +
    proc newOpenAiApi(baseUrl: string = "https://api.openai.com/v1";
                       apiKey: string = ""; organization: string = "";
    -                  curlPoolSize: int = 4; curlTimeout: float32 = 60000.0): OpenAiApi {.
    -    ...raises: [OpenAiError, Exception], tags: [ReadEnvEffect], forbids: [].}
    + maxInFlight: int = 16; curlTimeout: int = 60): OpenAiApi {. + ...raises: [OpenAiError, ResourceExhaustedError], tags: [ReadEnvEffect], + forbids: [].}
    Initialize a new OpenAI API client. Will use the provided apiKey, or look for the OPENAI_API_KEY environment variable. - Source   -Edit   + Source   +Edit   + +
    +
    + +
    +
    +
    +
    proc next(s: OpenAIStream): Option[ChatCompletionChunk] {.
    +    ...raises: [JsonError, ValueError], tags: [], forbids: [].}
    +
    + + next iterates over the response stream. returns the next chunk an empty seq is returned when the stream has been closed. nb. streams must be iterated to completion to avoid leaking streams + Source   +Edit  
    -
    -
    proc streamChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;
    -                          input: string; cb: proc (chunk: ChatCompletionChunk)) {.
    -    ...raises: [ZippyError, CatchableError, OpenAiError], tags: [RootEffect],
    -    forbids: [].}
    +
    +
    proc streamChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;
    +                          input: string): OpenAIStream {.
    +    ...raises: [CatchableError, OpenAiError], tags: [RootEffect], forbids: [].}
    Create a chat completion. - Source   -Edit   + Source   +Edit  
    -
    -
    proc streamChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq;
    -                          cb: proc (chunk: ChatCompletionChunk)) {.
    -    ...raises: [ZippyError, CatchableError, OpenAiError], tags: [RootEffect],
    -    forbids: [].}
    +
    +
    proc streamChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq): ResponseStream {.
    +    ...raises: [CatchableError, OpenAiError], tags: [RootEffect], forbids: [].}
    Stream a chat completion response - Source   -Edit   + Source   +Edit  
    @@ -1114,7 +1139,7 @@

    Procs

    diff --git a/openai_leap.html b/openai_leap.html index e0fceee..9e8701a 100644 --- a/openai_leap.html +++ b/openai_leap.html @@ -175,6 +175,7 @@

    src/openai_leap

    id*: string created*: int owned_by*: string">OpenAiModel
  • +
  • OpenAIStream
  • src/openai_leap + @@ -330,8 +333,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -345,8 +348,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -373,8 +376,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -389,8 +392,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -404,8 +407,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -419,8 +422,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -432,8 +435,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -444,8 +447,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -456,8 +459,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -469,8 +472,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -481,8 +484,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -492,8 +495,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -507,8 +510,8 @@

    Types

    ChatGPT Message object for chat completions and responses NB. content can be a string or a sequence of MessageContentPart objects, however this cannot be expressed in Nim easily, so we require a sequence of MessageContentPart objects - Source   -Edit   + Source   +Edit  
    @@ -519,8 +522,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -554,8 +557,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -565,8 +568,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -587,8 +590,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -599,8 +602,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -611,8 +614,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -627,8 +630,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -640,8 +643,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -651,8 +654,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -664,6 +667,16 @@

    Types

    + Source   +Edit   + +
    + +
    +
    OpenAIStream = ref object
    +
    + + Source   Edit   @@ -679,8 +692,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -690,8 +703,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -701,8 +714,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -713,8 +726,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -724,8 +737,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -735,8 +748,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -748,8 +761,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -760,8 +773,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -772,8 +785,8 @@

    Types

    - Source   -Edit   + Source   +Edit  
    @@ -791,8 +804,8 @@

    Procs

    Transcribe audio data. - Source   -Edit   + Source   +Edit  
    @@ -805,8 +818,8 @@

    Procs

    Cancel the fine tune model. - Source   -Edit   + Source   +Edit  
    @@ -818,8 +831,8 @@

    Procs

    Clean up the OpenAPI API client. - Source   -Edit   + Source   +Edit  
    @@ -834,8 +847,8 @@

    Procs

    Create a chat completion. - Source   -Edit   + Source   +Edit  
    @@ -846,8 +859,8 @@

    Procs

    Create a chat completion. without streaming. - Source   -Edit   + Source   +Edit  
    @@ -861,8 +874,8 @@

    Procs

    OpenAI fine tuning format is a jsonl file. At least 10 examples are required. 50 to 100 recommended. For a training file with 100,000 tokens trained over 3 epochs, the expected cost would be ~$2.40 USD. File will take time to process while uploading. Maximum file size is 512MB, but not files that big are not recommended. There is a 100gb limit across an organization. See: https://platform.openai.com/docs/api-reference/files/create - Source   -Edit   + Source   +Edit  
    @@ -876,8 +889,8 @@

    Procs

    Create a fine tune job. - Source   -Edit   + Source   +Edit  
    @@ -890,8 +903,8 @@

    Procs

    Delete a file. - Source   -Edit   + Source   +Edit  
    @@ -904,8 +917,8 @@

    Procs

    Delete the fine tune model. - Source   -Edit   + Source   +Edit  
    @@ -919,8 +932,8 @@

    Procs

    Delete a specific model. - Source   -Edit   + Source   +Edit  
    @@ -935,8 +948,8 @@

    Procs

    Generate embeddings for a list of documents. - Source   -Edit   + Source   +Edit  
    @@ -950,8 +963,8 @@

    Procs

    Get the details of a file. - Source   -Edit   + Source   +Edit  
    @@ -964,8 +977,8 @@

    Procs

    Get the status of the model. - Source   -Edit   + Source   +Edit  
    @@ -979,8 +992,8 @@

    Procs

    Get a specific model. - Source   -Edit   + Source   +Edit  
    @@ -994,8 +1007,8 @@

    Procs

    List all the files. - Source   -Edit   + Source   +Edit  
    @@ -1008,8 +1021,8 @@

    Procs

    List all the checkpoints for the fine tune model. See: https://platform.openai.com/docs/api-reference/fine-tuning/list-checkpoints - Source   -Edit   + Source   +Edit  
    @@ -1023,8 +1036,8 @@

    Procs

    List all the fine tune jobs. - Source   -Edit   + Source   +Edit  
    @@ -1037,8 +1050,8 @@

    Procs

    List all the events for the fine tune model. - Source   -Edit   + Source   +Edit  
    @@ -1052,53 +1065,65 @@

    Procs

    List available models. - Source   -Edit   + Source   +Edit  
    -
    -
    proc newOpenAiApi(baseUrl: string = "https://api.openai.com/v1";
    +  
    +
    proc newOpenAiApi(baseUrl: string = "https://api.openai.com/v1";
                       apiKey: string = ""; organization: string = "";
    -                  curlPoolSize: int = 4; curlTimeout: float32 = 60000.0): OpenAiApi {.
    -    ...raises: [OpenAiError, Exception], tags: [ReadEnvEffect], forbids: [].}
    + maxInFlight: int = 16; curlTimeout: int = 60): OpenAiApi {. + ...raises: [OpenAiError, ResourceExhaustedError], tags: [ReadEnvEffect], + forbids: [].}
    Initialize a new OpenAI API client. Will use the provided apiKey, or look for the OPENAI_API_KEY environment variable. - Source   -Edit   + Source   +Edit   + +
    +
    + +
    +
    +
    +
    proc next(s: OpenAIStream): Option[ChatCompletionChunk] {.
    +    ...raises: [JsonError, ValueError], tags: [], forbids: [].}
    +
    + + next iterates over the response stream. returns the next chunk an empty seq is returned when the stream has been closed. nb. streams must be iterated to completion to avoid leaking streams + Source   +Edit  
    -
    -
    proc streamChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;
    -                          input: string; cb: proc (chunk: ChatCompletionChunk)) {.
    -    ...raises: [ZippyError, CatchableError, OpenAiError], tags: [RootEffect],
    -    forbids: [].}
    +
    +
    proc streamChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;
    +                          input: string): OpenAIStream {.
    +    ...raises: [CatchableError, OpenAiError], tags: [RootEffect], forbids: [].}
    Create a chat completion. - Source   -Edit   + Source   +Edit  
    -
    -
    proc streamChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq;
    -                          cb: proc (chunk: ChatCompletionChunk)) {.
    -    ...raises: [ZippyError, CatchableError, OpenAiError], tags: [RootEffect],
    -    forbids: [].}
    +
    +
    proc streamChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq): ResponseStream {.
    +    ...raises: [CatchableError, OpenAiError], tags: [RootEffect], forbids: [].}
    Stream a chat completion response - Source   -Edit   + Source   +Edit  
    @@ -1114,7 +1139,7 @@

    Procs

    diff --git a/openai_leap.idx b/openai_leap.idx index a05e62c..d1980a9 100644 --- a/openai_leap.idx +++ b/openai_leap.idx @@ -1,59 +1,61 @@ nimTitle openai_leap openai_leap.html module src/openai_leap 0 nim OpenAiApi openai_leap.html#OpenAiApi type OpenAiApi 12 nim OpenAiError openai_leap.html#OpenAiError object OpenAiError 19 -nim OpenAiModel openai_leap.html#OpenAiModel type OpenAiModel 21 -nim Usage openai_leap.html#Usage type Usage 27 -nim ListModelResponse openai_leap.html#ListModelResponse type ListModelResponse 31 -nim DeleteModelResponse openai_leap.html#DeleteModelResponse type DeleteModelResponse 35 -nim CreateEmbeddingReq openai_leap.html#CreateEmbeddingReq type CreateEmbeddingReq 40 -nim CreateEmbeddingRespObj openai_leap.html#CreateEmbeddingRespObj type CreateEmbeddingRespObj 47 -nim CreateEmbeddingResp openai_leap.html#CreateEmbeddingResp type CreateEmbeddingResp 52 -nim ToolFunctionResp openai_leap.html#ToolFunctionResp type ToolFunctionResp 58 -nim ToolCallResp openai_leap.html#ToolCallResp type ToolCallResp 62 -nim ImageUrlPart openai_leap.html#ImageUrlPart type ImageUrlPart 67 -nim MessageContentPart openai_leap.html#MessageContentPart type MessageContentPart 71 -nim Message openai_leap.html#Message type Message 76 -nim RespMessage openai_leap.html#RespMessage type RespMessage 85 -nim ResponseFormatObj openai_leap.html#ResponseFormatObj type ResponseFormatObj 92 -nim ToolFunction openai_leap.html#ToolFunction type ToolFunction 96 -nim ToolCall openai_leap.html#ToolCall type ToolCall 101 -nim ToolChoiceFuncion openai_leap.html#ToolChoiceFuncion type ToolChoiceFuncion 105 -nim ToolChoice openai_leap.html#ToolChoice type ToolChoice 108 -nim CreateChatCompletionReq openai_leap.html#CreateChatCompletionReq type CreateChatCompletionReq 112 -nim CreateChatMessage openai_leap.html#CreateChatMessage type CreateChatMessage 133 -nim CreateChatCompletionResp openai_leap.html#CreateChatCompletionResp type CreateChatCompletionResp 140 -nim AudioTranscription openai_leap.html#AudioTranscription object AudioTranscription 149 -nim ChatCompletionChunk openai_leap.html#ChatCompletionChunk object ChatCompletionChunk 152 -nim OpenAIFineTuneMessage openai_leap.html#OpenAIFineTuneMessage type OpenAIFineTuneMessage 162 -nim OpenAIFineTuneChat openai_leap.html#OpenAIFineTuneChat type OpenAIFineTuneChat 166 -nim OpenAIFile openai_leap.html#OpenAIFile type OpenAIFile 169 -nim OpenAIListFiles openai_leap.html#OpenAIListFiles type OpenAIListFiles 177 -nim OpenAIHyperParameters openai_leap.html#OpenAIHyperParameters type OpenAIHyperParameters 181 -nim OpenAIFinetuneRequest openai_leap.html#OpenAIFinetuneRequest type OpenAIFinetuneRequest 187 -nim FineTuneError openai_leap.html#FineTuneError type FineTuneError 196 -nim OpenAIFinetuneJob openai_leap.html#OpenAIFinetuneJob type OpenAIFinetuneJob 201 -nim OpenAIFinetuneList openai_leap.html#OpenAIFinetuneList type OpenAIFinetuneList 220 -nim newOpenAiApi openai_leap.html#newOpenAiApi,string,string,string,int,float32 proc newOpenAiApi(baseUrl: string = "https://api.openai.com/v1"; apiKey: string = "";\n organization: string = ""; curlPoolSize: int = 4;\n curlTimeout: float32 = 60000.0): OpenAiApi 248 -nim close openai_leap.html#close,OpenAiApi proc close(api: OpenAiApi) 274 -nim listModels openai_leap.html#listModels,OpenAiApi proc listModels(api: OpenAiApi): seq[OpenAiModel] 376 -nim getModel openai_leap.html#getModel,OpenAiApi,string proc getModel(api: OpenAiApi; modelId: string): OpenAiModel 382 -nim deleteModel openai_leap.html#deleteModel,OpenAiApi,string proc deleteModel(api: OpenAiApi; modelId: string): DeleteModelResponse 387 -nim generateEmbeddings openai_leap.html#generateEmbeddings,OpenAiApi,string,string,Option[int],string proc generateEmbeddings(api: OpenAiApi; model: string; input: string;\n dimensions: Option[int] = none(int); user: string = ""): CreateEmbeddingResp 392 -nim createChatCompletion openai_leap.html#createChatCompletion,OpenAiApi,CreateChatCompletionReq proc createChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq): CreateChatCompletionResp 410 -nim streamChatCompletion openai_leap.html#streamChatCompletion,OpenAiApi,CreateChatCompletionReq,proc(ChatCompletionChunk) proc streamChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq;\n cb: proc (chunk: ChatCompletionChunk)) 420 -nim createChatCompletion openai_leap.html#createChatCompletion,OpenAiApi,string,string,string proc createChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;\n input: string): string 449 -nim streamChatCompletion openai_leap.html#streamChatCompletion,OpenAiApi,string,string,string,proc(ChatCompletionChunk) proc streamChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;\n input: string; cb: proc (chunk: ChatCompletionChunk)) 475 -nim createFineTuneDataset openai_leap.html#createFineTuneDataset,OpenAiApi,string proc createFineTuneDataset(api: OpenAiApi; filepath: string): OpenAIFile 501 -nim listFiles openai_leap.html#listFiles,OpenAiApi proc listFiles(api: OpenAiApi): OpenAIListFiles 536 -nim getFileDetails openai_leap.html#getFileDetails,OpenAiApi,string proc getFileDetails(api: OpenAiApi; fileId: string): OpenAIFile 541 -nim deleteFile openai_leap.html#deleteFile,OpenAiApi,string proc deleteFile(api: OpenAiApi; fileId: string) 546 -nim createFineTuneJob openai_leap.html#createFineTuneJob,OpenAiApi,OpenAIFinetuneRequest proc createFineTuneJob(api: OpenAiApi; req: OpenAIFinetuneRequest): OpenAIFinetuneJob 552 -nim getFineTuneModel openai_leap.html#getFineTuneModel,OpenAiApi,string proc getFineTuneModel(api: OpenAiApi; modelId: string) 561 -nim listFineTuneJobs openai_leap.html#listFineTuneJobs,OpenAiApi proc listFineTuneJobs(api: OpenAiApi): OpenAIFinetuneList 565 -nim listFineTuneModelEvents openai_leap.html#listFineTuneModelEvents,OpenAiApi,string proc listFineTuneModelEvents(api: OpenAiApi; modelId: string) 571 -nim listFineTuneCheckpoints openai_leap.html#listFineTuneCheckpoints,OpenAiApi,string proc listFineTuneCheckpoints(api: OpenAiApi; modelId: string) 575 -nim cancelFineTuneModel openai_leap.html#cancelFineTuneModel,OpenAiApi,string proc cancelFineTuneModel(api: OpenAiApi; modelId: string) 580 -nim deleteFineTuneModel openai_leap.html#deleteFineTuneModel,OpenAiApi,string proc deleteFineTuneModel(api: OpenAiApi; modelId: string) 584 -nim audioTranscriptions openai_leap.html#audioTranscriptions,OpenAiApi,string,string proc audioTranscriptions(api: OpenAiApi; model: string; audioData: string): AudioTranscription 588 -nimgrp createchatcompletion openai_leap.html#createChatCompletion-procs-all proc 410 -nimgrp streamchatcompletion openai_leap.html#streamChatCompletion-procs-all proc 420 +nim OpenAIStream openai_leap.html#OpenAIStream type OpenAIStream 21 +nim OpenAiModel openai_leap.html#OpenAiModel type OpenAiModel 25 +nim Usage openai_leap.html#Usage type Usage 31 +nim ListModelResponse openai_leap.html#ListModelResponse type ListModelResponse 35 +nim DeleteModelResponse openai_leap.html#DeleteModelResponse type DeleteModelResponse 39 +nim CreateEmbeddingReq openai_leap.html#CreateEmbeddingReq type CreateEmbeddingReq 44 +nim CreateEmbeddingRespObj openai_leap.html#CreateEmbeddingRespObj type CreateEmbeddingRespObj 51 +nim CreateEmbeddingResp openai_leap.html#CreateEmbeddingResp type CreateEmbeddingResp 56 +nim ToolFunctionResp openai_leap.html#ToolFunctionResp type ToolFunctionResp 62 +nim ToolCallResp openai_leap.html#ToolCallResp type ToolCallResp 66 +nim ImageUrlPart openai_leap.html#ImageUrlPart type ImageUrlPart 71 +nim MessageContentPart openai_leap.html#MessageContentPart type MessageContentPart 75 +nim Message openai_leap.html#Message type Message 80 +nim RespMessage openai_leap.html#RespMessage type RespMessage 89 +nim ResponseFormatObj openai_leap.html#ResponseFormatObj type ResponseFormatObj 96 +nim ToolFunction openai_leap.html#ToolFunction type ToolFunction 100 +nim ToolCall openai_leap.html#ToolCall type ToolCall 105 +nim ToolChoiceFuncion openai_leap.html#ToolChoiceFuncion type ToolChoiceFuncion 109 +nim ToolChoice openai_leap.html#ToolChoice type ToolChoice 112 +nim CreateChatCompletionReq openai_leap.html#CreateChatCompletionReq type CreateChatCompletionReq 116 +nim CreateChatMessage openai_leap.html#CreateChatMessage type CreateChatMessage 137 +nim CreateChatCompletionResp openai_leap.html#CreateChatCompletionResp type CreateChatCompletionResp 144 +nim AudioTranscription openai_leap.html#AudioTranscription object AudioTranscription 153 +nim ChatCompletionChunk openai_leap.html#ChatCompletionChunk object ChatCompletionChunk 156 +nim OpenAIFineTuneMessage openai_leap.html#OpenAIFineTuneMessage type OpenAIFineTuneMessage 166 +nim OpenAIFineTuneChat openai_leap.html#OpenAIFineTuneChat type OpenAIFineTuneChat 170 +nim OpenAIFile openai_leap.html#OpenAIFile type OpenAIFile 173 +nim OpenAIListFiles openai_leap.html#OpenAIListFiles type OpenAIListFiles 181 +nim OpenAIHyperParameters openai_leap.html#OpenAIHyperParameters type OpenAIHyperParameters 185 +nim OpenAIFinetuneRequest openai_leap.html#OpenAIFinetuneRequest type OpenAIFinetuneRequest 191 +nim FineTuneError openai_leap.html#FineTuneError type FineTuneError 200 +nim OpenAIFinetuneJob openai_leap.html#OpenAIFinetuneJob type OpenAIFinetuneJob 205 +nim OpenAIFinetuneList openai_leap.html#OpenAIFinetuneList type OpenAIFinetuneList 224 +nim newOpenAiApi openai_leap.html#newOpenAiApi,string,string,string,int,int proc newOpenAiApi(baseUrl: string = "https://api.openai.com/v1"; apiKey: string = "";\n organization: string = ""; maxInFlight: int = 16;\n curlTimeout: int = 60): OpenAiApi 252 +nim close openai_leap.html#close,OpenAiApi proc close(api: OpenAiApi) 278 +nim listModels openai_leap.html#listModels,OpenAiApi proc listModels(api: OpenAiApi): seq[OpenAiModel] 378 +nim getModel openai_leap.html#getModel,OpenAiApi,string proc getModel(api: OpenAiApi; modelId: string): OpenAiModel 384 +nim deleteModel openai_leap.html#deleteModel,OpenAiApi,string proc deleteModel(api: OpenAiApi; modelId: string): DeleteModelResponse 389 +nim generateEmbeddings openai_leap.html#generateEmbeddings,OpenAiApi,string,string,Option[int],string proc generateEmbeddings(api: OpenAiApi; model: string; input: string;\n dimensions: Option[int] = none(int); user: string = ""): CreateEmbeddingResp 394 +nim createChatCompletion openai_leap.html#createChatCompletion,OpenAiApi,CreateChatCompletionReq proc createChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq): CreateChatCompletionResp 412 +nim streamChatCompletion openai_leap.html#streamChatCompletion,OpenAiApi,CreateChatCompletionReq proc streamChatCompletion(api: OpenAiApi; req: CreateChatCompletionReq): ResponseStream 422 +nim createChatCompletion openai_leap.html#createChatCompletion,OpenAiApi,string,string,string proc createChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;\n input: string): string 431 +nim streamChatCompletion openai_leap.html#streamChatCompletion,OpenAiApi,string,string,string proc streamChatCompletion(api: OpenAiApi; model: string; systemPrompt: string;\n input: string): OpenAIStream 457 +nim next openai_leap.html#next,OpenAIStream proc next(s: OpenAIStream): Option[ChatCompletionChunk] 511 +nim createFineTuneDataset openai_leap.html#createFineTuneDataset,OpenAiApi,string proc createFineTuneDataset(api: OpenAiApi; filepath: string): OpenAIFile 549 +nim listFiles openai_leap.html#listFiles,OpenAiApi proc listFiles(api: OpenAiApi): OpenAIListFiles 584 +nim getFileDetails openai_leap.html#getFileDetails,OpenAiApi,string proc getFileDetails(api: OpenAiApi; fileId: string): OpenAIFile 589 +nim deleteFile openai_leap.html#deleteFile,OpenAiApi,string proc deleteFile(api: OpenAiApi; fileId: string) 594 +nim createFineTuneJob openai_leap.html#createFineTuneJob,OpenAiApi,OpenAIFinetuneRequest proc createFineTuneJob(api: OpenAiApi; req: OpenAIFinetuneRequest): OpenAIFinetuneJob 600 +nim getFineTuneModel openai_leap.html#getFineTuneModel,OpenAiApi,string proc getFineTuneModel(api: OpenAiApi; modelId: string) 609 +nim listFineTuneJobs openai_leap.html#listFineTuneJobs,OpenAiApi proc listFineTuneJobs(api: OpenAiApi): OpenAIFinetuneList 613 +nim listFineTuneModelEvents openai_leap.html#listFineTuneModelEvents,OpenAiApi,string proc listFineTuneModelEvents(api: OpenAiApi; modelId: string) 619 +nim listFineTuneCheckpoints openai_leap.html#listFineTuneCheckpoints,OpenAiApi,string proc listFineTuneCheckpoints(api: OpenAiApi; modelId: string) 623 +nim cancelFineTuneModel openai_leap.html#cancelFineTuneModel,OpenAiApi,string proc cancelFineTuneModel(api: OpenAiApi; modelId: string) 628 +nim deleteFineTuneModel openai_leap.html#deleteFineTuneModel,OpenAiApi,string proc deleteFineTuneModel(api: OpenAiApi; modelId: string) 632 +nim audioTranscriptions openai_leap.html#audioTranscriptions,OpenAiApi,string,string proc audioTranscriptions(api: OpenAiApi; model: string; audioData: string): AudioTranscription 636 +nimgrp createchatcompletion openai_leap.html#createChatCompletion-procs-all proc 412 +nimgrp streamchatcompletion openai_leap.html#streamChatCompletion-procs-all proc 422 diff --git a/theindex.html b/theindex.html index af736d5..92c9c7c 100644 --- a/theindex.html +++ b/theindex.html @@ -163,10 +163,14 @@

    Index

    newOpenAiApi:
    +
    next:
    OpenAiApi:
    +
    OpenAIStream:
    RespMessage:
    streamChatCompletion:
    ToolCall: