johniwasz / whetstone.chatgpt Goto Github PK
View Code? Open in Web Editor NEWA simple light-weight library that wraps the Open AI API.
Home Page: https://johniwasz.github.io/whetstone.chatgpt/
License: MIT License
A simple light-weight library that wraps the Open AI API.
Home Page: https://johniwasz.github.io/whetstone.chatgpt/
License: MIT License
System.Text.Json.JsonException: "'<' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
JsonReaderException: '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
Example:
var response = await client.CreateChatCompletionAsync(request);
Hi,could u support call the API from gpt-3.5-turbo?
Hi,
I've tried the simple 'How is the weather' example, but strangely I always get a few first words of the chat response, for example:
"The weather depends on your location. Generally it is advisable to check the"
What can be the reason for that?
thanks.
Hi there
Thanks for excellent work.
Sessions - I'm a bit lost how to continue a conversation and have multiple at same time - ask, answer, ask, answer, etc
Context - how to give the context for the questions on a broader level (documents, sites, text, etc)
Thanks
Ricardo
I'm using Function. But deserializer choose wrong class ChatGPTChatCompletionMessage
instead of ChatGPTAssistantCompletionMessage
.
Function call return Assistant Completion response. But deserializer always return ChatCompletion class and missing some properties. This is actual returning json
{
"id": "chatcmpl-8icO5Kj0IEqgDr6dU9J0E9Gecv4nQ",
"object": "chat.completion",
"created": 1705644685,
"model": "gpt-3.5-turbo-0613",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"id": "call_Ww3ocoHqydw5xhnS5H1CZImu",
"type": "function",
"function": {
"name": "getExchangeRate",
"arguments": "{\n \"currency\": \"USD\"\n}"
}
}
]
},
"logprobs": null,
"finish_reason": "tool_calls"
}
],
"usage": {
"prompt_tokens": 99,
"completion_tokens": 16,
"total_tokens": 115
},
"system_fingerprint": null
}
But after deserialized object looks like this
{
"Id": "chatcmpl-8iKN8vlb6QEYiGukfWLAlJNG0jS2V",
"Object": "chat.completion",
"Created": "2024-01-18T10:57:14Z",
"Model": "gpt-3.5-turbo-0613",
"Choices": [
{
"Index": 0,
"Message": {
"Role": "assistant",
"Content": null,
"Name": null
},
"FinishReason": "tool_calls"
}
],
"SystemFingerprint": null,
"Usage": {
"PromptTokens": 97,
"CompletionTokens": 16,
"TotalTokens": 113
}
}
How to fix this to deserialized by ChatGPTAssistantCompletionMessage
class.
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.