-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from undreamai/feature/embedding
Embedding and search functionality (RAG system)
- Loading branch information
Showing
112 changed files
with
18,825 additions
and
106 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
git config core.hooksPath .github/hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ obj/ | |
obj.meta | ||
bin/ | ||
bin.meta | ||
|
||
*.api | ||
*.api.meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using UnityEditor; | ||
|
||
namespace LLMUnity | ||
{ | ||
[CustomEditor(typeof(Embedding))] | ||
public class EmbeddingEditor : Editor | ||
{ | ||
|
||
void ShowProgress(float progress, string progressText) | ||
{ | ||
if (progress != 1) EditorGUI.ProgressBar(EditorGUILayout.GetControlRect(), progress, progressText); | ||
} | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
Embedding embdeddingScript = (Embedding)target; | ||
SerializedObject embdeddingScriptSO = new SerializedObject(embdeddingScript); | ||
embdeddingScriptSO.Update(); | ||
|
||
embdeddingScriptSO.ApplyModifiedProperties(); | ||
string[] options = new string[embdeddingScript.options.Length]; | ||
for (int i = 0; i < embdeddingScript.options.Length; i++) | ||
{ | ||
options[i] = embdeddingScript.options[i].Item1; | ||
} | ||
|
||
int newIndex = EditorGUILayout.Popup("Model", embdeddingScript.SelectedOption, options); | ||
if (newIndex != embdeddingScript.SelectedOption) | ||
{ | ||
embdeddingScript.SelectModel(newIndex); | ||
} | ||
ShowProgress(embdeddingScript.downloadProgress, "Downloading model"); | ||
embdeddingScriptSO.ApplyModifiedProperties(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.