Skip to content

WithFiles - option for streams#14

Merged
pswierad-src merged 5 commits into
mainfrom
feat/use-files-stream
Mar 21, 2025
Merged

WithFiles - option for streams#14
pswierad-src merged 5 commits into
mainfrom
feat/use-files-stream

Conversation

@pswierad-src
Copy link
Copy Markdown
Collaborator

Added WithFiles overload that utilizes streams. Added example that uses this case. WIP on script for smarter release process

Copy link
Copy Markdown
Contributor

@wisedev-pstach wisedev-pstach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small suggestions for readability

.CompleteAsync();

Console.WriteLine(result.Message.Content);
Console.ReadKey();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running example in external console, the window disappears immediately after finishing example. Added so that user can see what's happening.

Comment thread Examples/Examples/Program.cs Outdated
{
("\u25a0 Basic Chat", _serviceProvider.GetRequiredService<ChatExample>()),
("\u25a0 Chat with Files", _serviceProvider.GetRequiredService<ChatWithFilesExample>()),
("\u25a0 Chat with Files from stream [TEMPORARY]", _serviceProvider.GetRequiredService<ChatWithFilesFromStreamExample>()),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If works fine, remove temporary :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment thread MaIN.Server/Program.cs Outdated
app.MapPost("/api/llm/askmemory", async ([FromServices] ILLMService llmService, AskMemoryRequest request) =>
{
var result = await llmService.AskMemory(request.Chat, request.TextData, request.FileData, request.Memory);
//TODO: file streams
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry to tell ya, but i completly removed MaIN.Server project on my branch :D as MaIN (base api) already serve same idea :D

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed todo

@pswierad-src pswierad-src merged commit d1602e9 into main Mar 21, 2025
@pswierad-src pswierad-src deleted the feat/use-files-stream branch March 21, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants