Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills/tryagi-openai/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dnx tryAGI.OpenAI.CLI auth show

## Detected auth schemes

- HTTP `bearer`
- HTTP `bearer`

## For agents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ partial void ProcessCancelARunResponseContent(
PrepareCancelARunRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
runId: runId);
threadId: threadId!,
runId: runId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ partial void ProcessCreateMessageResponseContent(
PrepareCreateMessageRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
threadId: threadId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ partial void ProcessCreateRunResponseContent(
PrepareCreateRunRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
threadId: threadId!,
include: include,
request: request);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ partial void ProcessDeleteMessageResponseContent(
PrepareDeleteMessageRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
messageId: messageId);
threadId: threadId!,
messageId: messageId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessDeleteThreadResponseContent(
PrepareDeleteThreadRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId);
threadId: threadId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ partial void ProcessListMessagesResponseContent(
PrepareListMessagesRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
threadId: threadId!,
limit: limit,
order: order,
after: after,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ partial void ProcessListRunStepsResponseContent(
PrepareListRunStepsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
runId: runId,
threadId: threadId!,
runId: runId!,
limit: limit,
order: order,
after: after,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ partial void ProcessListRunsResponseContent(
PrepareListRunsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
threadId: threadId!,
limit: limit,
order: order,
after: after,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ partial void ProcessModifyMessageResponseContent(
PrepareModifyMessageRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
messageId: messageId,
threadId: threadId!,
messageId: messageId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ partial void ProcessModifyRunResponseContent(
PrepareModifyRunRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
runId: runId,
threadId: threadId!,
runId: runId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ partial void ProcessModifyThreadResponseContent(
PrepareModifyThreadRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
threadId: threadId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ partial void ProcessRetrieveMessageResponseContent(
PrepareRetrieveMessageRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
messageId: messageId);
threadId: threadId!,
messageId: messageId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ partial void ProcessRetrieveRunResponseContent(
PrepareRetrieveRunRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
runId: runId);
threadId: threadId!,
runId: runId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ partial void ProcessRetrieveRunStepResponseContent(
PrepareRetrieveRunStepRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
runId: runId,
stepId: stepId,
threadId: threadId!,
runId: runId!,
stepId: stepId!,
include: include);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ partial void ProcessRetrieveThreadResponseContent(
PrepareRetrieveThreadRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId);
threadId: threadId!);

return __httpRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ partial void ProcessSubmitToolOutputsToRunResponseContent(
PrepareSubmitToolOutputsToRunRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
threadId: threadId,
runId: runId,
threadId: threadId!,
runId: runId!,
request: request);

return __httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,34 @@ partial void ProcessCreateTranscriptionResponseContent(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty<byte>());
__contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Filename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentFile,
name: "\"file\"",
Expand All @@ -151,28 +179,28 @@ partial void ProcessCreateTranscriptionResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Language}"),
content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty),
name: "\"language\"");
}
if (request.Prompt != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Prompt}"),
content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty),
name: "\"prompt\"");
}
if (request.ResponseFormat != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.ResponseFormat).HasValue ? (request.ResponseFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"response_format\"");
}
if (request.Temperature != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Temperature}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.Temperature, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"temperature\"");
}
if (request.Include != default)
Expand All @@ -193,14 +221,14 @@ partial void ProcessCreateTranscriptionResponseContent(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Stream}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Stream, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"stream\"");
}
if (request.ChunkingStrategy != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ChunkingStrategy}"),
content: new global::System.Net.Http.StringContent(request.ChunkingStrategy.ToString() ?? string.Empty),
name: "\"chunking_strategy\"");
}
if (request.KnownSpeakerNames != default)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,34 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
}
var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
var __contentFile = new global::System.Net.Http.ByteArrayContent(request.File ?? global::System.Array.Empty<byte>());
__contentFile.Headers.ContentType = new global::System.Net.Http.Headers.MediaTypeHeaderValue(
request.Filename is null
? "application/octet-stream"
: (global::System.IO.Path.GetExtension(request.Filename) ?? string.Empty).ToLowerInvariant() switch
{
".aac" => "audio/aac",
".flac" => "audio/flac",
".gif" => "image/gif",
".jpeg" => "image/jpeg",
".jpg" => "image/jpeg",
".json" => "application/json",
".m4a" => "audio/mp4",
".mp3" => "audio/mpeg",
".mp4" => "video/mp4",
".mpeg" => "audio/mpeg",
".mpga" => "audio/mpeg",
".oga" => "audio/ogg",
".ogg" => "audio/ogg",
".opus" => "audio/ogg",
".pdf" => "application/pdf",
".png" => "image/png",
".txt" => "text/plain",
".wav" => "audio/wav",
".weba" => "audio/webm",
".webm" => "video/webm",
".webp" => "image/webp",
_ => "application/octet-stream",
});
__httpRequestContent.Add(
content: __contentFile,
name: "\"file\"",
Expand All @@ -146,28 +174,28 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Language}"),
content: new global::System.Net.Http.StringContent(request.Language ?? string.Empty),
name: "\"language\"");
}
if (request.Prompt != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Prompt}"),
content: new global::System.Net.Http.StringContent(request.Prompt ?? string.Empty),
name: "\"prompt\"");
}
if (request.ResponseFormat != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ResponseFormat?.ToValueString()}"),
content: new global::System.Net.Http.StringContent((request.ResponseFormat).HasValue ? (request.ResponseFormat).GetValueOrDefault().ToValueString() : string.Empty),
name: "\"response_format\"");
}
if (request.Temperature != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Temperature}"),
content: new global::System.Net.Http.StringContent(global::System.Convert.ToString(request.Temperature, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty),
name: "\"temperature\"");
}
if (request.Include != default)
Expand All @@ -188,14 +216,14 @@ partial void ProcessCreateTranscriptionAsStreamResponse(
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Stream}"),
content: new global::System.Net.Http.StringContent((global::System.Convert.ToString(request.Stream, global::System.Globalization.CultureInfo.InvariantCulture) ?? string.Empty).ToLowerInvariant()),
name: "\"stream\"");
}
if (request.ChunkingStrategy != default)
{

__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.ChunkingStrategy}"),
content: new global::System.Net.Http.StringContent(request.ChunkingStrategy.ToString() ?? string.Empty),
name: "\"chunking_strategy\"");
}
if (request.KnownSpeakerNames != default)
Expand Down
Loading