You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running memory kernel in a docker container - just as described in https://hub.docker.com/r/kernelmemory/service - this setup spins up memory kernel as it's own separate web service.
As I'm making a dependency on IMemoryKernel in my client web api, I got confused on wether I should use MemoryWebClient or
KernelMemoryBuilder.
So I started compairing memorywebclient and KernelMemoryBuilder up against each other.
First requirement I have is that I want to set up my own orchestration, because I'm not sure how it works directly using ImportDocumentAsync via MemoryWebClient. Plus I also want more a little more control over how it processes the files.
I started looking at the implementation of MemoryWebClient, which isn't able to setup orchestrate as far as I can see. Correct me if I'm wrong.
But I don't know how I would use KernelMemoryBuilder , if all I do is calling my webservice.
So please help me out here and tell me what's the different purpose of KernelMemoryBuilder and MemoryWebClient?
public static void AddKernelMemoryService(this IHostApplicationBuilder builder, string name)
{
builder.Services.AddScoped<IKernelMemory>(services =>
{
var httpClient = services.GetRequiredService<HttpClient>();
//httpClient.BaseAddress = new Uri("http://127.0.0.1:9001/");
//httpClient.BaseAddress = new Uri($"http://{name}/");
var t = new KernelMemoryBuilder().Build();
new MemoryWebClient($"http://{name}/", httpClient)
.ImportDocumentAsync()
//return new MemoryWebClient($"http://{name}/");
return new MemoryWebClient($"http://{name}/", httpClient);
});
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm running memory kernel in a docker container - just as described in https://hub.docker.com/r/kernelmemory/service - this setup spins up memory kernel as it's own separate web service.
As I'm making a dependency on IMemoryKernel in my client web api, I got confused on wether I should use MemoryWebClient or
KernelMemoryBuilder.
So I started compairing memorywebclient and KernelMemoryBuilder up against each other.
First requirement I have is that I want to set up my own orchestration, because I'm not sure how it works directly using ImportDocumentAsync via MemoryWebClient. Plus I also want more a little more control over how it processes the files.
I started looking at the implementation of MemoryWebClient, which isn't able to setup orchestrate as far as I can see. Correct me if I'm wrong.
But I don't know how I would use KernelMemoryBuilder , if all I do is calling my webservice.
So please help me out here and tell me what's the different purpose of KernelMemoryBuilder and MemoryWebClient?
Beta Was this translation helpful? Give feedback.
All reactions