Skip to content

remove support for LLM base prompt #285

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

Merged
merged 1 commit into from
Dec 2, 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
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,6 @@ If the user's GPU is not supported, the LLM will fall back to the CPU

</details>

#### 🗨️ Chat Settings
- <details><summary>Advanced options</summary>

- `Base Prompt` a common base prompt to use across all LLMCharacter objects using the LLM

</details>

### LLMCharacter Settings

- `Show/Hide Advanced Options` Toggle to show/hide advanced options from below
Expand Down
10 changes: 0 additions & 10 deletions Runtime/LLM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ public class LLM : MonoBehaviour
[DynamicRange("minContextLength", "maxContextLength", false), Model] public int contextSize = 8192;
/// <summary> Batch size for prompt processing. </summary>
[ModelAdvanced] public int batchSize = 512;
/// <summary> a base prompt to use as a base for all LLMCaller objects </summary>
[TextArea(5, 10), ChatAdvanced] public string basePrompt = "";
/// <summary> Boolean set to true if the server has started and is ready to receive requests, false otherwise. </summary>
public bool started { get; protected set; } = false;
/// <summary> Boolean set to true if the server has failed to start. </summary>
Expand Down Expand Up @@ -132,7 +130,6 @@ public async void Awake()
await Task.Run(() => StartLLMServer(arguments));
if (!started) return;
if (dontDestroyOnLoad) DontDestroyOnLoad(transform.root.gameObject);
if (basePrompt != "") await SetBasePrompt(basePrompt);
}

/// <summary>
Expand Down Expand Up @@ -778,13 +775,6 @@ public async Task<string> Completion(string json, Callback<string> streamCallbac
return result;
}

public async Task SetBasePrompt(string base_prompt)
{
AssertStarted();
SystemPromptRequest request = new SystemPromptRequest() { system_prompt = base_prompt, prompt = " ", n_predict = 0 };
await Completion(JsonUtility.ToJson(request));
}

/// <summary>
/// Allows to cancel the requests in a specific slot of the LLM
/// </summary>
Expand Down
Loading