Comments (4)
Please provide full stack trace and example file
from com.openai.unity.
2023 中文测试中文测试文测试.docx
I provide a minmum example.
Here is the full stack:
ArgumentException: The output byte buffer is too small to contain the encoded data, encoding 'Unicode (UTF-8)' fallback 'System.Text.EncoderReplacementFallback'.
Parameter name: bytes
System.Text.Encoding.ThrowBytesOverflow () (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
System.Text.Encoding.ThrowBytesOverflow (System.Text.EncoderNLS encoder, System.Boolean nothingEncoded) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
System.Text.UTF8Encoding.GetBytes (System.Char* chars, System.Int32 charCount, System.Byte* bytes, System.Int32 byteCount, System.Text.EncoderNLS baseEncoder) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
System.Text.UTF8Encoding.GetBytes (System.Char* chars, System.Int32 charCount, System.Byte* bytes, System.Int32 byteCount) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
UnityEngine.WWWTranscoder.SevenBitClean (System.String s, System.Text.Encoding e) (at <b3175cf5e68b4630a894aa95aa711ad1>:0)
UnityEngine.WWWForm.get_data () (at <b3175cf5e68b4630a894aa95aa711ad1>:0)
UnityEngine.Networking.UnityWebRequest.SetupPost (UnityEngine.Networking.UnityWebRequest request, UnityEngine.WWWForm formData) (at <b3175cf5e68b4630a894aa95aa711ad1>:0)
UnityEngine.Networking.UnityWebRequest.Post (System.String uri, UnityEngine.WWWForm formData) (at <b3175cf5e68b4630a894aa95aa711ad1>:0)
Utilities.WebRequestRest.Rest.PostAsync (System.String query, UnityEngine.WWWForm formData, Utilities.WebRequestRest.RestParameters parameters, System.Threading.CancellationToken cancellationToken) (at ./Library/PackageCache/[email protected]/Runtime/Rest.cs:157)
OpenAI.Files.FilesEndpoint.UploadFileAsync (OpenAI.Files.FileUploadRequest request, System.IProgress`1[T] uploadProgress, System.Threading.CancellationToken cancellationToken) (at ./Library/PackageCache/[email protected]/Runtime/Files/FilesEndpoint.cs:87)
OpenAI.Files.FilesEndpoint.UploadFileAsync (System.String filePath, System.String purpose, System.IProgress`1[T] uploadProgress, System.Threading.CancellationToken cancellationToken) (at ./Library/PackageCache/[email protected]/Runtime/Files/FilesEndpoint.cs:68)
TeamFlow.Utilities.OpenAIUtility.UploadFileAsync (System.String filePath, System.Action`1[T] callback) (at Assets/Scripts/TeamFlow/Utilities/OpenAIUtility.cs:178)
Cysharp.Threading.Tasks.UniTaskCompletionSourceCore`1[TResult].GetResult (System.Int16 token) (at Assets/Plugins/UniTask/Runtime/UniTaskCompletionSource.cs:244)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`2[TStateMachine,T].GetResult (System.Int16 token) (at Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs:342)
Cysharp.Threading.Tasks.UniTask`1+Awaiter[T].GetResult () (at Assets/Plugins/UniTask/Runtime/UniTask.cs:653)
TeamFlow.TeamFlowFile.UploadFile () (at Assets/Scripts/TeamFlow/Nodes/Architecture/TeamFlowFile.cs:42)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <f7237cf7abef49bfbb552d7eb076e422>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <f7237cf7abef49bfbb552d7eb076e422>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <f7237cf7abef49bfbb552d7eb076e422>:0)
By the way,I find if I shorten the filename,this issue cannot happen.
from com.openai.unity.
If the file whose name includes Chinese and is uploaded successfully,it will cause garbled text.
Now i am trying to find the solution.
from com.openai.unity.
Yeah this seems to be an issue with the web request uploader itself.
I wonder if it helps to change the encoding of the file.
from com.openai.unity.
Related Issues (20)
- Issue with Chat Vision HOT 3
- Custom Assistant in Sample ChatBehaviour HOT 8
- Can't compile after updating plugins?
- A member with the name 'name' already exists on 'OpenAI.Chat.Message' HOT 4
- "Run Thread" methods results in "Internal Server Error"
- OpenAI proxy server like api.pawan.krd
- CreateTranscriptionAsync in the same second HOT 2
- Token to request ChatGPT thru a proxy
- Firebase Function
- parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'
- Streaming + function calling
- Stream text to speech
- Release of invalid GC handle. The handle is from a previous domain. The release operation is skipped.
- Moving from text completions to chat completions HOT 1
- Support for Flexible URL Configuration with Cloudflare AI Gateway
- Does the Assistants feature allow streaming? HOT 1
- Add ToolChoice to CreateRunRequest method HOT 1
- when creating a new ChatRequest, where do I define the assistant?
- Change OpenAI-Beta header to assistants=v2 HOT 1
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 com.openai.unity.