Comments (4)
@isaacwalkercox I have tried to reproduce your error and it seems to work for various cases (example):
var completionRequest = new CompletionRequest
{
Prompt = "one two three",
MaxTokens = 5,
Temperature = 0,
TopP = 1,
PresencePenalty = 0,
FrequencyPenalty = 0,
Logprobs = 10,
StopSequence = "###"
};
var result = await api.Completions.CreateCompletionAsync(completionRequest);
Indeed token_logprobs
maps to an IList<double>
which cannot accept null values, but I cannot figure out a case when the OpenAI returns a null prob value.
Can you provide the code that did not work for you?
from openai-api-dotnet.
I have managed to reproduce this by mistake with the following code:
private OpenAIAPI GetApi => new OpenAIAPI(engine: Engine.Ada);
var api = GetApi;
var completionReq = new CompletionRequest
{
Prompt = "three four five",
Temperature = 0,
MaxTokens = 5,
Echo = true,
StopSequence = "eight"
};
var results = await api.Completions.CreateCompletionsAsync(completionReq);
By replacing List<double>
should be replaced with List<double?>
, it works as expected. If this solution is acceptable, I will create a PR with this minor fix.
Note: After a while, it no longer reproduces. It might be some throttling or similar that makes OpenAI not return those values sometimes.
from openai-api-dotnet.
i know this is old, i'm trying to check on some of these...
i ran your test code and seems to execute without error.
is this still an issue?
from openai-api-dotnet.
@gotmike Yes. This issue was resolved. Thank you for double checking.
from openai-api-dotnet.
Related Issues (20)
- Model.GPT4 still selects gpt-3 model HOT 1
- IHttpClientFactory Missing a "using" from source code HOT 1
- ✨ Alternative implementations also available HOT 8
- Azure - HTTP status code: NotFound. Content: {"error":{"code":"404","message": "Resource not found"}})' HOT 1
- Image Generation: DALL-E-3 HOT 7
- Error converting value "gpt-3.5-turbo-0613" to type 'OpenAI_API.Models.Model HOT 3
- StreamResponseEnumerableFromChatbotAsync (and StreamResponseFromChatbotAsync) call endpoint twice HOT 3
- OpenAI Assistant API support HOT 3
- GetSpeechAsStreamAsync - NAudio HOT 4
- Image variations HOT 1
- [UNITY] Chat Streaming Error: WebException: The request was aborted: The request was canceled. HOT 3
- Getting 100 sec timeout when using completion endpoint. I tried Httpclient HOT 1
- Chat Streaming does not work HOT 2
- - nevermind - can delete HOT 5
- The SSL connection could not be established, see inner exception. HOT 1
- Running the tests HOT 1
- ChatMessage Content bugs introduced on 1.9 version
- How to customize API website addresses? HOT 2
- Azure Open AI Bring Your Own Data Unity ???
- How to choose gpt-4-0125-preview completion model to be used?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openai-api-dotnet.