blazekill / codeblaze.semantickernel Goto Github PK
View Code? Open in Web Editor NEWSome Cool Semantic Kernel Plugins
License: MIT License
Some Cool Semantic Kernel Plugins
License: MIT License
Hi there,
Thanks so much for the connector.
Please could you describe how to get message streaming working?
I have set up the project accordingly and when attempting to stream i receive an error:
result = chatCompletionService.GetStreamingChatMessageContentsAsync(
history,
executionSettings: _openAIPromptExecutionSettings,
kernel: kernel);
System.Text.Json.JsonException
HResult=0x80131500
Message='{' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: 1 | BytePositionInLine: 0.
Source=System.Text.Json
StackTrace:
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan
1 utf8Json, JsonTypeInfo1 jsonTypeInfo, Nullable
1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo
1 jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at Codeblaze.SemanticKernel.Connectors.Ollama.OllamaChatCompletionService.d__2.MoveNext()
at Codeblaze.SemanticKernel.Connectors.Ollama.OllamaChatCompletionService.d__2.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at xxx.d__2.MoveNext() in xxx
at xxx.d__2.MoveNext() in xxx
at Program.<
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
JsonReaderException: '{' is invalid after a single JSON value. Expected end of data. LineNumber: 1 | BytePositionInLine: 0.
hi i am getting method not found exception, can you please help and tell me what i am doing wrong
System.MissingMethodException: 'Method not found: 'System.Collections.Generic.Dictionary`2<System.String,System.Object> Microsoft.SemanticKernel.PromptExecutionSettings.get_ExtensionData()'.'
try
{
var builder = Kernel.CreateBuilder();
// provide the HTTP client used to interact with Ollama API
builder.Services.AddTransient<HttpClient>();
builder.AddOllamaTextGeneration(
modelId: "mistral:latest", // Ollama model Id
baseUrl: "http://127.0.0.1:11434" // Ollama endpoint
);
var kernel = builder.Build();
string prompt = File.ReadAllText("prompt.txt");
string input = "test";
var result = await kernel.InvokePromptAsync(prompt, new KernelArguments
{ {"input", input} });
string s = result.GetValue<string>();
}
catch (Exception ex)
{
}
prompt.txt
Bot: How can I help you?
User: {{$input}}
---------------------------------------------
The intent of the user in 5 words or less:
i am using .net 8 winform project
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.