Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where WebGL build fails #398

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Scripts/LLM/ChatGPT/ChatGPTServiceWebGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public override async UniTask StartStreamingAsync(ChatGPTSession chatGPTSession,
{
data.Add("max_tokens", MaxTokens);
}
if (useFunctions && llmTools.Count > 0)
if (useFunctions && Tools.Count > 0)
{
var tools = new List<Dictionary<string, object>>();
foreach (var tool in llmTools)
foreach (var tool in Tools)
{
tools.Add(new Dictionary<string, object>()
{
Expand Down
4 changes: 2 additions & 2 deletions Scripts/LLM/Claude/ClaudeServiceWebGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public override async UniTask StartStreamingAsync(ClaudeSession claudeSession, D
{ "stream", true },
};

if (llmTools.Count > 0) // tools must be included when tool_result
if (Tools.Count > 0) // tools must be included when tool_result
{
var claudeTools = new List<ClaudeTool>();
foreach (var tool in llmTools)
foreach (var tool in Tools)
{
claudeTools.Add(new ClaudeTool(tool));
}
Expand Down
4 changes: 2 additions & 2 deletions Scripts/LLM/CommandR/CommandRServiceWebGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ public override async UniTask StartStreamingAsync(string inputText, List<Command
data["tool_results"] = toolResults;
}

if (llmTools.Count > 0)
if (Tools.Count > 0)
{
var commandRTools = new List<CommandRTool>();
foreach (var tool in llmTools)
foreach (var tool in Tools)
{
commandRTools.Add(new CommandRTool(tool));
}
Expand Down
4 changes: 2 additions & 2 deletions Scripts/LLM/Gemini/GeminiServiceWebGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public override async UniTask StartStreamingAsync(GeminiSession geminiSession, D
}

// Set tools. Multimodal model doesn't support function calling for now (2023.12.29)
if (useFunctions && llmTools.Count > 0 && !Model.ToLower().Contains("vision"))
if (useFunctions && Tools.Count > 0 && !Model.ToLower().Contains("vision"))
{
data.Add("tools", new List<Dictionary<string, object>>(){
new Dictionary<string, object> {
{ "function_declarations", llmTools }
{ "function_declarations", Tools }
}
});
}
Expand Down