task_id int64 0 2.26k | repository stringclasses 18
values | commit_hash stringclasses 241
values | filepath stringclasses 237
values | original_method stringlengths 21 4.65k | context listlengths 0 77 | masking dict |
|---|---|---|---|---|---|---|
1,300 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | default
^ default ifNil: [
default := self new directory:
'.gradle/caches/modules-2/files-2.1' ] | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "default\n\n\t^ default ifNil: [\n\t\t default := self",
"suffix": "",
"completion": " new directory:\n\t\t\t '.gradle/caches/modules-2/files-2.1' ]"
} |
1,301 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | default
^ default ifNil: [
default := self new directory:
'.gradle/caches/modules-2/files-2.1' ] | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "default\n\n\t^ default ifNil: [\n\t\t default := self",
"suffix": " ]",
"completion": " new directory:\n\t\t\t '.gradle/caches/modules-2/files-2.1'"
} |
1,302 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | findGroup: group name: name version: version type: type
"Search for an artifact (a file) based on its descriptor."
| artifactDirectory fileName |
(artifactDirectory := FileLocator home / directory / group / name
/ version) ifAbsent: [ ^ nil ].
fileName := name , '-' , version , '.' , type.
... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 7,
"prefix": "findGroup: group name: name version: version type: type\n\t\"Search for an artifact (a file) based on its descriptor.\"\n\n\t| artifactDirectory fileName |\n\t(artifactDirectory := FileLocator home / directory / group / name\n\t ... |
1,303 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | findGroup: group name: name version: version type: type
"Search for an artifact (a file) based on its descriptor."
| artifactDirectory fileName |
(artifactDirectory := FileLocator home / directory / group / name
/ version) ifAbsent: [ ^ nil ].
fileName := name , '-' , version , '.' , type.
... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "findGroup: group name: name version: version type: type\n\t\"Search for an artifact (a file) based on its descriptor.\"\n\n\t| artifactDirectory fileName |\n\t(artifactDirectory := FileLocator home / directory / group / name\n\t ... |
1,304 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | findGroup: group name: name version: version type: type
"Search for an artifact (a file) based on its descriptor."
| artifactDirectory fileName |
(artifactDirectory := FileLocator home / directory / group / name
/ version) ifAbsent: [ ^ nil ].
fileName := name , '-' , version , '.' , type.
... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "findGroup: group name: name version: version type: type\n\t\"Search for an artifact (a file) based on its descriptor.\"\n\n\t| artifactDirectory fileName |\n\t(artifactDirectory := FileLocator home / directory / group / name\n\t ... |
1,305 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | resolve: descriptor
| parts group name type version scope path artifact |
parts := $: split: descriptor.
group := parts at: 1.
name := parts at: 2.
type := parts at: 3.
version := parts at: 4.
scope := parts at: 5.
path := parts at: 6.
artifact := path asFileReference ifAbsent: [
(self
... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "resolve: descriptor\n\n\t| parts group name type version scope path artifact |\n\tparts := $: split: descriptor.\n\tgroup :=",
"suffix": ".\n\tname := parts at: 2.\n\ttype := parts at: 3.\n\tversion := parts at: 4.\n\tscope := parts a... |
1,306 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | resolve: descriptor
| parts group name type version scope path artifact |
parts := $: split: descriptor.
group := parts at: 1.
name := parts at: 2.
type := parts at: 3.
version := parts at: 4.
scope := parts at: 5.
path := parts at: 6.
artifact := path asFileReference ifAbsent: [
(self
... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "resolve: descriptor\n\n\t| parts group name type version scope path artifact |\n\tparts :=",
"suffix": ".\n\tgroup := parts at: 1.\n\tname := parts at: 2.\n\ttype := parts at: 3.\n\tversion := parts at: 4.\n\tscope := parts at: 5.\n\t... |
1,307 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusGradleRepository.class.st | resolve: descriptor
| parts group name type version scope path artifact |
parts := $: split: descriptor.
group := parts at: 1.
name := parts at: 2.
type := parts at: 3.
version := parts at: 4.
scope := parts at: 5.
path := parts at: 6.
artifact := path asFileReference ifAbsent: [
(self
... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 4,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "resolve: descriptor\n\n\t| parts group name type version scope path artifact |\n\tparts := $: split: descriptor.\n\tgroup := parts at: 1.\n\tname := parts at: 2.\n\ttype := parts at: 3.\n\tversion :=",
"suffix": ".\n\tscope := parts a... |
1,308 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusMavenProjectImporter.class.st | initialize
localRepositories := { NexusMavenRepository default } | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "initialize\n\n\tlocalRepositories :=",
"suffix": "",
"completion": " { NexusMavenRepository default }"
} |
1,309 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusProjectImporter.class.st | importFromDirectory: directory
"Expects the path string of a directory containing the sources of a project, imports it and returns it."
^ (self fromDirectory: directory) import | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 5,
"prefix": "importFromDirectory: directory\n\t\"Expects the path string of a directory containing the sources of a project, imports it and returns it.\"\n\n\t^ (",
"suffix": "",
"completion": "self fromDirectory: directory) import"
} |
1,310 | https://github.com/moosetechnology/MooseNexus | f5a51ff8442cc47b67ce9a6b8d5a4d0eee34836f | src/MooseNexus/NexusRepository.class.st | printOn: stream
super printOn: stream.
stream nextPut: $(.
stream nextPutAll: directory pathString.
stream nextPut: $) | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus-UI/NexusDependencyConflictPresenter.class.st",
"code": "SpPresenter subclass: #NexusDependencyConflictPresenter\n\tinstanceVariableNames: '#idLabel #lockButton #isLocked #versionRadioButtons #lockedVersion => ObservableSlot #descriptors #conflictId'\n\tcla... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "printOn: stream\n\n\tsuper printOn: stream.\n\tstream nextPut: $(.\n\tstream",
"suffix": ".\n\tstream nextPut: $)",
"completion": " nextPutAll: directory pathString"
} |
1,311 | https://github.com/moosetechnology/MooseNexus | 8e84897ca863ada84f77986eb4f37cb7e4efd72f | src/MooseNexus-Tests/NexusMavenProjectParameterizedTest.class.st | initializeCase: aCase withMavenOutput: mavenOutput andDirectories: directories
"Some case data is computed here instead of being hard-coded, such as paths."
| projectName dependencies projects root repositoryPath importer project |
projectName := aCase at: #name.
dependencies := aCase at: #dependencies.
pro... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusProject.class.st",
"code": "Object subclass: #NexusProject\n\tinstanceVariableNames: 'name group version directory dependencies'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Project'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "initializeCase: aCase withMavenOutput: mavenOutput andDirectories: directories\n \t\"Some case data is computed here instead of being hard-coded, such as paths.\"\n \n \t| projectName dependencies projects root repositoryPath impor... |
1,312 | https://github.com/moosetechnology/MooseNexus | a0067945e79bac86564ead098469f15d63b1b108 | src/MooseNexus/NexusGradleProjectImporter.class.st | read
"Gradle does not provide a command to output flat dependencies.
Instead of implementing dark magic parsing, we add a task to the build file and run it.
Either use the global 'gradle' command or a local 'gradlew' wrapper."
| buildFile gradleCmd originalSize |
buildFile := self findBuildFile.
gradleCmd ... | [] | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "read\n \t\"Gradle does not provide a command to output flat dependencies.\n \tInstead of implementing dark magic parsing, we add a task to the build file and run it.\n \tEither use the global 'gradle' command or a local 'gradlew' wrappe... |
1,313 | https://github.com/moosetechnology/MooseNexus | 2c8421261a8ce3a6771e3e7dcbed2d3681174016 | src/MooseNexus/NexusMavenProjectImporter.class.st | parseProject: raw startingAt: initialStart
"Parses the description and dependencies of a single project (a Maven module).
Resolves each dependency to obtain the path to its local location.
The project can be from a different file hierarchy than the import directory,
in which case it is still parsed to update th... | [] | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "parseProject: raw startingAt: initialStart\n \t\"Parses the description and dependencies of a single project (a Maven module).\n \tResolves each dependency to obtain the path to its local location.\n \tThe project can be from a dif... |
1,314 | https://github.com/moosetechnology/MooseNexus | 2c8421261a8ce3a6771e3e7dcbed2d3681174016 | src/MooseNexus/NexusMavenProjectImporter.class.st | parseProject: raw startingAt: initialStart
"Parses the description and dependencies of a single project (a Maven module).
Resolves each dependency to obtain the path to its local location.
The project can be from a different file hierarchy than the import directory,
in which case it is still parsed to update th... | [] | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "parseProject: raw startingAt: initialStart\n \t\"Parses the description and dependencies of a single project (a Maven module).\n \tResolves each dependency to obtain the path to its local location.\n \tThe project can be from a differen... |
1,315 | https://github.com/moosetechnology/MooseNexus | 71d5884067fdb898ea82c4702a834f8713c82da8 | src/MooseNexus/NexusDockerVerveineJRunner.class.st | writeCommand
^ String streamContents: [ :s |
s << 'docker run --rm -v ' << target << '/sources:/src -v '
<< target
<< '/dependencies:/dependency ghcr.io/evref-bl/verveinej:'
<< self version << ' '.
self printOptionsOn: s ] | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusProject.class.st",
"code": "Object subclass: #NexusProject\n\tinstanceVariableNames: 'name group version directory dependencies'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Project'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 6,
"prefix": "writeCommand\n\n\t^ String streamContents: [ :s |\n\t\t s << 'docker run --rm -v ' << target << '/sources:/src -v '\n\t\t << target\n\t\t << '/dependencies:/dependency ghcr.io/evref-bl/verveinej:'\n\t\t << self version <<",
"suffix": ... |
1,316 | https://github.com/moosetechnology/MooseNexus | 71d5884067fdb898ea82c4702a834f8713c82da8 | src/MooseNexus/NexusDockerVerveineJRunner.class.st | writeCommand
^ String streamContents: [ :s |
s << 'docker run --rm -v ' << target << '/sources:/src -v '
<< target
<< '/dependencies:/dependency ghcr.io/evref-bl/verveinej:'
<< self version << ' '.
self printOptionsOn: s ] | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusProject.class.st",
"code": "Object subclass: #NexusProject\n\tinstanceVariableNames: 'name group version directory dependencies'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Project'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus... | {
"fim_idx": 1,
"mask_type": "binary_message",
"n_masked_tokens": 9,
"prefix": "writeCommand\n\n\t^ String streamContents: [ :s |\n\t\t s << 'docker run --rm -v ' << target << '/sources:/src -v '",
"suffix": ".\n\t\t self printOptionsOn: s ]",
"completion": "\n\t\t << target\n\t\t << '/dependencies:/dep... |
1,317 | https://github.com/moosetechnology/MooseNexus | a6c3b73acf700513f1f9548504a6c575fb8711b2 | src/MooseNexus/NexusGradleProjectImporter.class.st | versionCode
^ versionCode ifNil: [ versionCode := 'project.version' ] | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusProject.class.st",
"code": "Object subclass: #NexusProject\n\tinstanceVariableNames: 'name group version directory dependencies'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Project'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 5,
"prefix": "versionCode\n\n\t^ versionCode ifNil:",
"suffix": "",
"completion": " [ versionCode := 'project.version' ]"
} |
1,318 | https://github.com/moosetechnology/MooseNexus | 416a8a475557b23a2fc9f8e194dde3a4b7a59600 | src/MooseNexus/NexusModelBuilder.class.st | on: aNexusProject
^ self new project: aNexusProject | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusVerveineJRunner.class.st",
"code": "NexusModelExtractor subclass: #NexusVerveineJRunner\n\tinstanceVariableNames: 'format summary allLocals anchor excludePaths javaVersion jvmArgs'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-ModelExtraction'"
... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "on: aNexusProject\n\n\t^",
"suffix": "",
"completion": " self new project: aNexusProject"
} |
1,319 | https://github.com/moosetechnology/MooseNexus | 416a8a475557b23a2fc9f8e194dde3a4b7a59600 | src/MooseNexus/NexusModelBuilder.class.st | registerModel: modelPath
"Name and move the model file, and register it with the project models."
| projectDirectory source |
projectDirectory := FileLocator home / project directory.
source := projectDirectory / modelPath.
source moveTo:
((projectDirectory / 'models') ensureCreateDirectory
/ self modelName ... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusVerveineJRunner.class.st",
"code": "NexusModelExtractor subclass: #NexusVerveineJRunner\n\tinstanceVariableNames: 'format summary allLocals anchor excludePaths javaVersion jvmArgs'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-ModelExtraction'"
... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "registerModel: modelPath\n\t\"Name and move the model file, and register it with the project models.\"\n\n\t| projectDirectory source |\n\tprojectDirectory := FileLocator home / project directory.\n\tsource",
"suffix": ".\n\tsource mo... |
1,320 | https://github.com/moosetechnology/MooseNexus | 416a8a475557b23a2fc9f8e194dde3a4b7a59600 | src/MooseNexus/NexusModelBuilder.class.st | registerModel: modelPath
"Name and move the model file, and register it with the project models."
| projectDirectory source |
projectDirectory := FileLocator home / project directory.
source := projectDirectory / modelPath.
source moveTo:
((projectDirectory / 'models') ensureCreateDirectory
/ self modelName ... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusVerveineJRunner.class.st",
"code": "NexusModelExtractor subclass: #NexusVerveineJRunner\n\tinstanceVariableNames: 'format summary allLocals anchor excludePaths javaVersion jvmArgs'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-ModelExtraction'"
... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "registerModel: modelPath\n\t\"Name and move the model file, and register it with the project models.\"\n\n\t| projectDirectory source |\n\tprojectDirectory := FileLocator home / project directory.\n\tsource := projectDirectory / mo... |
1,321 | https://github.com/moosetechnology/MooseNexus | 416a8a475557b23a2fc9f8e194dde3a4b7a59600 | src/MooseNexus/NexusModelBuilder.class.st | registerModel: modelPath
"Name and move the model file, and register it with the project models."
| projectDirectory source |
projectDirectory := FileLocator home / project directory.
source := projectDirectory / modelPath.
source moveTo:
((projectDirectory / 'models') ensureCreateDirectory
/ self modelName ... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusVerveineJRunner.class.st",
"code": "NexusModelExtractor subclass: #NexusVerveineJRunner\n\tinstanceVariableNames: 'format summary allLocals anchor excludePaths javaVersion jvmArgs'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-ModelExtraction'"
... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 9,
"prefix": "registerModel: modelPath\n\t\"Name and move the model file, and register it with the project models.\"\n\n\t| projectDirectory source |\n\tprojectDirectory := FileLocator home / project directory.\n\tsource := projectDirectory / mo... |
1,322 | https://github.com/moosetechnology/MooseNexus | 416a8a475557b23a2fc9f8e194dde3a4b7a59600 | src/MooseNexus/NexusProject.class.st | addModel: modelDescription
"Add a model to the list of models for this project, overwriting any with the same name"
| modelName models |
modelName := modelDescription at: 'name'.
models := self models reject: [ :desc |
(desc at: 'name') = modelName ].
models := models copyWith: modelDescription.
Fil... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusVerveineJRunner.class.st",
"code": "NexusModelExtractor subclass: #NexusVerveineJRunner\n\tinstanceVariableNames: 'format summary allLocals anchor excludePaths javaVersion jvmArgs'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-ModelExtraction'"
... | {
"fim_idx": 3,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "addModel: modelDescription\n\t\"Add a model to the list of models for this project, overwriting any with the same name\"\n\n\t| modelName models |\n\tmodelName := modelDescription at: 'name'.\n\tmodels := self models reject: [ :desc |\n... |
1,323 | https://github.com/moosetechnology/MooseNexus | 416a8a475557b23a2fc9f8e194dde3a4b7a59600 | src/MooseNexus/NexusProject.class.st | addModel: modelDescription
"Add a model to the list of models for this project, overwriting any with the same name"
| modelName models |
modelName := modelDescription at: 'name'.
models := self models reject: [ :desc |
(desc at: 'name') = modelName ].
models := models copyWith: modelDescription.
Fil... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusVerveineJRunner.class.st",
"code": "NexusModelExtractor subclass: #NexusVerveineJRunner\n\tinstanceVariableNames: 'format summary allLocals anchor excludePaths javaVersion jvmArgs'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-ModelExtraction'"
... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 9,
"prefix": "addModel: modelDescription\n\t\"Add a model to the list of models for this project, overwriting any with the same name\"\n\n\t| modelName models |\n\tmodelName := modelDescription at: 'name'.\n\tmodels := self models reject: [ :des... |
1,324 | https://github.com/moosetechnology/MooseNexus | 416a8a475557b23a2fc9f8e194dde3a4b7a59600 | src/MooseNexus/NexusProject.class.st | addModel: modelDescription
"Add a model to the list of models for this project, overwriting any with the same name"
| modelName models |
modelName := modelDescription at: 'name'.
models := self models reject: [ :desc |
(desc at: 'name') = modelName ].
models := models copyWith: modelDescription.
Fil... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusVerveineJRunner.class.st",
"code": "NexusModelExtractor subclass: #NexusVerveineJRunner\n\tinstanceVariableNames: 'format summary allLocals anchor excludePaths javaVersion jvmArgs'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-ModelExtraction'"
... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 10,
"prefix": "addModel: modelDescription\n\t\"Add a model to the list of models for this project, overwriting any with the same name\"\n\n\t| modelName models |\n\tmodelName := modelDescription at: 'name'.\n\tmodels := self models reject: [ :",
"s... |
1,325 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | windowExtent
^ 16 @ 9 * 50 | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "windowExtent\n\n\t^ 16 @",
"suffix": "",
"completion": " 9 * 50"
} |
1,326 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | defaultLayout
^ SpBoxLayout newTopToBottom
add: (SpBoxLayout newLeftToRight
add: ('Folders to parse' asPresenter addStyle: 'title2');
addLast: dependencyCheckbox;
addLast: deleteButton;
yourself)
expand: false;
add: foldersList withConstraints: [ :c | c padding: 10 ];
add: ... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "defaultLayout\n\n\t^ SpBoxLayout newTopToBottom\n\t\t add: (SpBoxLayout newLeftToRight\n\t\t\t\t add: ('Folders to parse' asPresenter addStyle: 'title2');\n\t\t\t\t addLast: dependencyCheckbox;\n\t\t\t\t addLast: deleteButton;\n\t\t\... |
1,327 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | initializeAddFolderPresenter
| addFolder addSubFolders |
addFolderPresenter := self instantiate: SpPresenter.
addFolder := addFolderPresenter newButton
label: 'Add folder';
iconName: #add;
action: [ self openFolderSelection ].
addSubFolders := addFolderPresenter newBut... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 2,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initializeAddFolderPresenter\n\n\t| addFolder addSubFolders |\n\taddFolderPresenter := self instantiate: SpPresenter.\n\n\taddFolder := addFolderPresenter newButton\n\t\t label: 'Add folder';\n\t\t iconName: #add... |
1,328 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | initializeAddFolderPresenter
| addFolder addSubFolders |
addFolderPresenter := self instantiate: SpPresenter.
addFolder := addFolderPresenter newButton
label: 'Add folder';
iconName: #add;
action: [ self openFolderSelection ].
addSubFolders := addFolderPresenter newBut... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "initializeAddFolderPresenter\n\n\t| addFolder addSubFolders |\n\taddFolderPresenter",
"suffix": ".\n\n\taddFolder := addFolderPresenter newButton\n\t\t label: 'Add folder';\n\t\t iconName: #add;\n\t\t ... |
1,329 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | initializeAddFolderPresenter
| addFolder addSubFolders |
addFolderPresenter := self instantiate: SpPresenter.
addFolder := addFolderPresenter newButton
label: 'Add folder';
iconName: #add;
action: [ self openFolderSelection ].
addSubFolders := addFolderPresenter newBut... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "initializeAddFolderPresenter\n\n\t| addFolder addSubFolders |\n\taddFolderPresenter := self instantiate: SpPresenter.\n\n\taddFolder := addFolderPresenter newButton\n\t\t label: 'Add folder';\n\t\t iconName:... |
1,330 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | initializePresenters
self initializeAddFolderPresenter.
foldersList := self newComponentList addPresenter: addFolderPresenter.
dependencyCheckbox := self newCheckBox
labelOnLeft;
label: 'Include dependencies';
help: 'Toggle all'.
deleteButto... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "initializePresenters\n\n\tself initializeAddFolderPresenter.\n\n\tfoldersList := self newComponentList addPresenter: addFolderPresenter.\n\n\tdependencyCheckbox := self newCheckBox\n\t\t labelOnLeft;\n\t\t ... |
1,331 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | initializePresenters
self initializeAddFolderPresenter.
foldersList := self newComponentList addPresenter: addFolderPresenter.
dependencyCheckbox := self newCheckBox
labelOnLeft;
label: 'Include dependencies';
help: 'Toggle all'.
deleteButto... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 5,
"prefix": "initializePresenters\n\n\tself initializeAddFolderPresenter.\n\n\tfoldersList",
"suffix": ".\n\n\tdependencyCheckbox := self newCheckBox\n\t\t labelOnLeft;\n\t\t label: 'Include dependencies';... |
1,332 | https://github.com/moosetechnology/MooseNexus | 7653ff03a19acfddd2bcafe3ca8a99285cfecff9 | src/MooseNexus-UI/NexusImportModelDialog.class.st | initializePresenters
self initializeAddFolderPresenter.
foldersList := self newComponentList addPresenter: addFolderPresenter.
dependencyCheckbox := self newCheckBox
labelOnLeft;
label: 'Include dependencies';
help: 'Toggle all'.
deleteButto... | [
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/NexusDependencyRepository.class.st",
"code": "Object subclass: #NexusDependencyRepository\n\tinstanceVariableNames: 'directory'\n\tclassVariableNames: ''\n\tpackage: 'MooseNexus-Repository'"
},
{
"filepath": "repo_clone/MooseNexus/src/MooseNexus/Ne... | {
"fim_idx": 3,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initializePresenters\n\n\tself initializeAddFolderPresenter.\n\n\tfoldersList := self newComponentList addPresenter: addFolderPresenter.\n\n\tdependencyCheckbox := self newCheckBox\n\t\t labelOnLeft;\n\t\t ... |
1,333 | https://github.com/Gabriel-Darbord/Musical-Instrument | 55a265517b008b22b661afbc35027f5f25a6b46d | src/BaselineOfMusical/BaselineOfMusical.class.st | baseline: spec
spec for: #common do: [
spec
baseline: 'Phausto'
with: [ spec repository: 'github://lucretiomsp/phausto:main/src' ].
spec package: 'Musical' with: [ spec requires: #( 'Phausto' ) ].
spec
group: 'core' with: #( 'Musical' );
group: 'tests' with: #( );
group: 'default' with: #( 'co... | [] | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "baseline: spec\n\n\tspec for: #common do: [\n\t\tspec\n\t\t\tbaseline: 'Phausto'\n\t\t\twith: [ spec repository: 'github://lucretiomsp/phausto:main/src' ].\n\n\t\tspec package: 'Musical' with: [ spec requires: #( 'Phausto' ) ].\n\n... |
1,334 | https://github.com/Gabriel-Darbord/Musical-Instrument | 55a265517b008b22b661afbc35027f5f25a6b46d | src/BaselineOfMusical/BaselineOfMusical.class.st | baseline: spec
spec for: #common do: [
spec
baseline: 'Phausto'
with: [ spec repository: 'github://lucretiomsp/phausto:main/src' ].
spec package: 'Musical' with: [ spec requires: #( 'Phausto' ) ].
spec
group: 'core' with: #( 'Musical' );
group: 'tests' with: #( );
group: 'default' with: #( 'co... | [] | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "baseline: spec\n\n\tspec for: #common do: [\n\t\tspec\n\t\t\tbaseline: 'Phausto'\n\t\t\twith: [",
"suffix": ".\n\n\t\tspec package: 'Musical' with: [ spec requires: #( 'Phausto' ) ].\n\n\t\tspec\n\t\t\tgroup: 'core' with: #( 'Mus... |
1,335 | https://github.com/Gabriel-Darbord/Musical-Instrument | 55a265517b008b22b661afbc35027f5f25a6b46d | src/BaselineOfMusical/BaselineOfMusical.class.st | baseline: spec
spec for: #common do: [
spec
baseline: 'Phausto'
with: [ spec repository: 'github://lucretiomsp/phausto:main/src' ].
spec package: 'Musical' with: [ spec requires: #( 'Phausto' ) ].
spec
group: 'core' with: #( 'Musical' );
group: 'tests' with: #( );
group: 'default' with: #( 'co... | [] | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "baseline: spec\n\n\tspec for: #common do: [\n\t\tspec\n\t\t\tbaseline: 'Phausto'\n\t\t\twith: [ spec repository: 'github://lucretiomsp/phausto:main/src' ].\n\n\t\tspec package: 'Musical' with: [ spec requires:",
"suffix": " ].\n\... |
1,336 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalModalPercussionInstrument.class.st | isAbstract
^ self == MusicalModalPercussionInstrument | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "isAbstract\n\n\t^",
"suffix": "",
"completion": " self == MusicalModalPercussionInstrument"
} |
1,337 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalModalPercussionInstrument.class.st | play
Dsp trig: self instrumentName , 'Trigger' | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "play\n\n\tDsp",
"suffix": "",
"completion": " trig: self instrumentName , 'Trigger'"
} |
1,338 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalModalPercussionInstrument.class.st | playFrequency: anInteger
| instrumentName |
instrumentName := self instrumentName.
Dsp setValue: anInteger parameter: instrumentName , 'Freq'.
Dsp trig: instrumentName , 'Trigger' | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "playFrequency: anInteger\n\n\t| instrumentName |\n\tinstrumentName",
"suffix": ".\n\tDsp setValue: anInteger parameter: instrumentName , 'Freq'.\n\tDsp trig: instrumentName , 'Trigger'",
"completion": " := self instrumentName"
} |
1,339 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalModalPercussionInstrument.class.st | playFrequency: anInteger
| instrumentName |
instrumentName := self instrumentName.
Dsp setValue: anInteger parameter: instrumentName , 'Freq'.
Dsp trig: instrumentName , 'Trigger' | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "playFrequency: anInteger\n\n\t| instrumentName |\n\tinstrumentName := self instrumentName.\n\tDsp setValue: anInteger parameter:",
"suffix": ".\n\tDsp trig: instrumentName , 'Trigger'",
"completion": " instrumentName , 'Freq'"
... |
1,340 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalModalPercussionInstrument.class.st | playFrequency: anInteger
| instrumentName |
instrumentName := self instrumentName.
Dsp setValue: anInteger parameter: instrumentName , 'Freq'.
Dsp trig: instrumentName , 'Trigger' | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "playFrequency: anInteger\n\n\t| instrumentName |\n\tinstrumentName := self instrumentName.\n\tDsp setValue: anInteger parameter: instrumentName , 'Freq'.\n\tDsp trig:",
"suffix": "",
"completion": " instrumentName , 'Trigger'"
... |
1,341 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalScaledInstrument.class.st | playOnScale: aScale
Dsp
playNote: (aScale at: (MusicalRandom nextInteger: aScale size))
prefix: self instrumentName
dur: 0.005 seconds | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "playOnScale: aScale\n\n\tDsp\n\t\tplayNote: (aScale at: (MusicalRandom nextInteger: aScale size))\n\t\tprefix: self instrumentName",
"suffix": "",
"completion": "\n\t\tdur: 0.005 seconds"
} |
1,342 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalTpSampler.class.st | instrument
| source |
source := self sampleFolder.
samples := source asFileReference children.
^ TpSampler new
name: self instrumentName;
pathToFolder: source;
yourself | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "instrument\n \n\t| source |\n\tsource",
"suffix": ".\n\tsamples := source asFileReference children.\n \t^ TpSampler new\n\t\t name: self instrumentName;\n\t\t pathToFolder: source;\n \t\t yourself",
"completion": " := self sample... |
1,343 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalTpSampler.class.st | instrument
| source |
source := self sampleFolder.
samples := source asFileReference children.
^ TpSampler new
name: self instrumentName;
pathToFolder: source;
yourself | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "instrument\n \n\t| source |\n\tsource := self sampleFolder.\n\tsamples :=",
"suffix": ".\n \t^ TpSampler new\n\t\t name: self instrumentName;\n\t\t pathToFolder: source;\n \t\t yourself",
"completion": " source asFileReference ch... |
1,344 | https://github.com/Gabriel-Darbord/Musical-Instrument | ccfe6e1d50d48241f21ff873cf95852371835807 | src/Musical/MusicalTpSampler.class.st | isAbstract
^ self == MusicalTpSampler | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.class.st",
"code": "MusicalTpSampler subclass: #MusicalScream\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalScream.cla... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "isAbstract\n\n\t^",
"suffix": "",
"completion": " self == MusicalTpSampler"
} |
1,345 | https://github.com/Gabriel-Darbord/Musical-Instrument | 497b78dd7342df8a79a095b6af66a72dd832a043 | src/Musical/OTMusicalException.class.st | beforeExecutionWithReceiver: receiver arguments: arguments
"on exception, not when debugging"
receiver exception class == OupsNullException ifFalse: [
receiver class playMusicalInstrument ] | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/OTMusicalInstrumentationModule.class.st",
"code": "OTInstrumentationModule subclass: #OTMusicalInstrumentationModule\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instrumentation'"
},
{
"filepath": "repo_clone/Mus... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "beforeExecutionWithReceiver: receiver arguments: arguments\n\t\"on exception, not when debugging\"\n\n\treceiver exception class ==",
"suffix": "",
"completion": " OupsNullException ifFalse: [\n\t\treceiver class playMusicalIns... |
1,346 | https://github.com/Gabriel-Darbord/Musical-Instrument | 32693635c68526d8a1cf9ba0dfa963195f234231 | src/Musical/MusicalInstrument.class.st | shutDown: quitting
quitting ifFalse: [ ^ self ].
OTMusicalInstrumentationModule uninstall | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/OTMusicalInstrumentationModule.class.st",
"code": "OTInstrumentationModule subclass: #OTMusicalInstrumentationModule\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instrumentation'"
},
{
"filepath": "repo_clone/Mus... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "shutDown: quitting\n\n\tquitting",
"suffix": ".\n\tOTMusicalInstrumentationModule uninstall",
"completion": " ifFalse: [ ^ self ]"
} |
1,347 | https://github.com/Gabriel-Darbord/Musical-Instrument | d1a3debab45240fb0a2f8594168f7303741322e7 | src/Musical-Example/OTMusicalExampleInstrumentationModule.class.st | instrumentations
^ {
OTMusicalCollection.
OTMusicalGarbageCollector } | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalDefaultSampler.class.st",
"code": "MusicalTpSampler subclass: #MusicalDefaultSampler\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/M... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "instrumentations\n\n\t^ {\n\t\t OTMusicalCollection",
"suffix": "",
"completion": ".\n\t\t OTMusicalGarbageCollector }"
} |
1,348 | https://github.com/Gabriel-Darbord/Musical-Instrument | d1a3debab45240fb0a2f8594168f7303741322e7 | src/Musical-Example/OTMusicalExampleInstrumentationModule.class.st | musicalInstruments
"List of instruments that must be created for this instrumentation to work."
^ {
MusicalMarimba.
MusicalChordy.
MusicalFm2Op.
MusicalScream } | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/MusicalDefaultSampler.class.st",
"code": "MusicalTpSampler subclass: #MusicalDefaultSampler\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instruments'"
},
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/M... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 6,
"prefix": "musicalInstruments\n\t\"List of instruments that must be created for this instrumentation to work.\"\n\n\t^ {\n\t\t MusicalMarimba.",
"suffix": "",
"completion": "\n\t\t MusicalChordy.\n\t\t MusicalFm2Op.\n\t\t MusicalScream }"
} |
1,349 | https://github.com/Gabriel-Darbord/Musical-Instrument | d1a3debab45240fb0a2f8594168f7303741322e7 | src/Musical/MusicalInstrument.class.st | install
"Install all enabled musical instrumentation modules.
Ask them for their required instruments and initialize the DSP.
Note: the DSP is not created and the modules not installed if no instruments are required.
Prefer calling #reinstall for manual handling."
| modules instruments |
modules := OrderedCollec... | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/OTMusicalInstrumentationModule.class.st",
"code": "OTInstrumentationModule subclass: #OTMusicalInstrumentationModule\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instrumentation'"
},
{
"filepath": "repo_clone/Mus... | {
"fim_idx": 6,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "install\n\t\"Install all enabled musical instrumentation modules.\n\tAsk them for their required instruments and initialize the DSP.\n\tNote: the DSP is not created and the modules not installed if no instruments are required.\n\tPrefer... |
1,350 | https://github.com/Gabriel-Darbord/Musical-Instrument | d1a3debab45240fb0a2f8594168f7303741322e7 | src/Musical/MusicalInstrument.class.st | install
"Install all enabled musical instrumentation modules.
Ask them for their required instruments and initialize the DSP.
Note: the DSP is not created and the modules not installed if no instruments are required.
Prefer calling #reinstall for manual handling."
| modules instruments |
modules := OrderedCollec... | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/OTMusicalInstrumentationModule.class.st",
"code": "OTInstrumentationModule subclass: #OTMusicalInstrumentationModule\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instrumentation'"
},
{
"filepath": "repo_clone/Mus... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "install\n\t\"Install all enabled musical instrumentation modules.\n\tAsk them for their required instruments and initialize the DSP.\n\tNote: the DSP is not created and the modules not installed if no instruments are required.\n\tPrefer... |
1,351 | https://github.com/Gabriel-Darbord/Musical-Instrument | d1a3debab45240fb0a2f8594168f7303741322e7 | src/Musical/MusicalInstrument.class.st | install
"Install all enabled musical instrumentation modules.
Ask them for their required instruments and initialize the DSP.
Note: the DSP is not created and the modules not installed if no instruments are required.
Prefer calling #reinstall for manual handling."
| modules instruments |
modules := OrderedCollec... | [
{
"filepath": "repo_clone/Musical-Instrument/src/Musical/OTMusicalInstrumentationModule.class.st",
"code": "OTInstrumentationModule subclass: #OTMusicalInstrumentationModule\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'Musical-Instrumentation'"
},
{
"filepath": "repo_clone/Mus... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "install\n\t\"Install all enabled musical instrumentation modules.\n\tAsk them for their required instruments and initialize the DSP.\n\tNote: the DSP is not created and the modules not installed if no instruments are required.\n\tP... |
1,352 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/BaselineOfLLMAPI/BaselineOfLLMAPI.class.st | baseline: spec
<baseline>
spec for: #common do: [
self defineDependencies: spec.
self definePackages: spec.
self defineGroups: spec ] | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "baseline: spec\n\n\t<baseline>\n\tspec for: #common do: [\n\t\tself defineDependencies: spec.\n\t\tself",
"suffix": "",
"completion": " definePackages: spec.\n\t\tself defineGroups: spec ]"
} |
1,353 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/BaselineOfLLMAPI/BaselineOfLLMAPI.class.st | defineDependencies: spec
spec
baseline: 'NeoJSON'
with: [ spec repository: 'github://svenvc/NeoJSON/repository' ] | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "defineDependencies: spec\n\n\tspec\n\t\tbaseline: 'NeoJSON'\n\t\twith: [ spec",
"suffix": "",
"completion": " repository: 'github://svenvc/NeoJSON/repository' ]"
} |
1,354 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/BaselineOfLLMAPI/BaselineOfLLMAPI.class.st | definePackages: spec
spec package: 'LLM-API' with: [ spec requires: #( 'NeoJSON' ) ] | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "definePackages: spec\n\n\tspec package: 'LLM-API' with:",
"suffix": "",
"completion": " [ spec requires: #( 'NeoJSON' ) ]"
} |
1,355 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/BaselineOfLLMAPI/BaselineOfLLMAPI.class.st | definePackages: spec
spec package: 'LLM-API' with: [ spec requires: #( 'NeoJSON' ) ] | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "definePackages: spec\n\n\tspec package: 'LLM-API' with: [ spec requires:",
"suffix": " ]",
"completion": " #( 'NeoJSON' )"
} |
1,356 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPI.class.st | initialize
super initialize.
client := ZnClient new | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initialize\n\n\tsuper initialize.\n\tclient",
"suffix": "",
"completion": " := ZnClient new"
} |
1,357 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPI.class.st | prepareRequest
self apiKey ifNotNil: [ :_apiKey |
client setBearerAuthentication: _apiKey ].
client forJsonREST.
client https.
client host: self host.
client path: self path | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "prepareRequest\n\n\tself apiKey ifNotNil:",
"suffix": ".\n\tclient forJsonREST.\n\tclient https.\n\tclient host: self host.\n\tclient path: self path",
"completion": " [ :_apiKey |\n\t\tclient setBearerAuthentication: _apiKey ]... |
1,358 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPI.class.st | prepareRequest
self apiKey ifNotNil: [ :_apiKey |
client setBearerAuthentication: _apiKey ].
client forJsonREST.
client https.
client host: self host.
client path: self path | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "prepareRequest\n\n\tself apiKey ifNotNil: [ :_apiKey |\n\t\tclient setBearerAuthentication: _apiKey ].\n\tclient forJsonREST.\n\tclient https.\n\tclient",
"suffix": ".\n\tclient path: self path",
"completion": " host: self host... |
1,359 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPI.class.st | prepareRequest
self apiKey ifNotNil: [ :_apiKey |
client setBearerAuthentication: _apiKey ].
client forJsonREST.
client https.
client host: self host.
client path: self path | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "prepareRequest\n\n\tself apiKey ifNotNil: [ :_apiKey |\n\t\tclient setBearerAuthentication: _apiKey ].\n\tclient forJsonREST.\n\tclient https.\n\tclient host: self host.\n\tclient",
"suffix": "",
"completion": " path: self path... |
1,360 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPIChat.class.st | performRequest
self prepareRequest.
self client entity: (ZnEntity json:
(NeoJSONWriter toString: self content asJsonableObject)).
^ self client post | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "performRequest\n\n\tself prepareRequest.\n\tself client entity: (ZnEntity json:\n\t\t\t (NeoJSONWriter",
"suffix": ".\n\t^ self client post",
"completion": " toString: self content asJsonableObject))"
} |
1,361 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPIChat.class.st | performRequest
self prepareRequest.
self client entity: (ZnEntity json:
(NeoJSONWriter toString: self content asJsonableObject)).
^ self client post | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 1,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "performRequest\n\n\tself prepareRequest.\n\tself client entity: (ZnEntity json:\n\t\t\t (NeoJSONWriter toString: self content asJsonableObject)).\n\t^",
"suffix": "",
"completion": " self client post"
} |
1,362 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPIChatObjectMessage.class.st | role: aRole content: aContent
^ self new
role: aRole;
content: aContent;
yourself | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 8,
"prefix": "role: aRole content: aContent\n\n\t^ self",
"suffix": "",
"completion": " new\n\t\t role: aRole;\n\t\t content: aContent;\n\t\t yourself"
} |
1,363 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPIChatObjectMessage.class.st | asJsonableObject
^ Dictionary new
at: #content put: self content;
at: #role put: self role;
yourself | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 7,
"prefix": "asJsonableObject\n\n\t^ Dictionary new\n\t\t at: #content put: self content;",
"suffix": "",
"completion": "\n\t\t at: #role put: self role;\n\t\t yourself"
} |
1,364 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPIChatObjectPayload.class.st | asJsonableObject
| dic |
dic := Dictionary new.
self messages ifNotNil: [ :_messages |
dic
at: #messages
put: (_messages collect: [ :message | message asJsonableObject ]) ].
self temperature ifNotNil: [ :v | dic at: #temperature put: v ].
self top_p ifNotNil: [ :v | dic at: #top_p put: v ].
self model if... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 10,
"prefix": "asJsonableObject\n\n\t| dic |\n\tdic := Dictionary new.\n\tself messages ifNotNil: [ :_messages |\n\t\tdic\n\t\t\tat: #messages\n\t\t\tput: (_messages collect: [ :message | message asJsonableObject ]) ].\n\tself temperature ifNotN... |
1,365 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPIChatObjectPayload.class.st | asJsonableObject
| dic |
dic := Dictionary new.
self messages ifNotNil: [ :_messages |
dic
at: #messages
put: (_messages collect: [ :message | message asJsonableObject ]) ].
self temperature ifNotNil: [ :v | dic at: #temperature put: v ].
self top_p ifNotNil: [ :v | dic at: #top_p put: v ].
self model if... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "asJsonableObject\n\n\t| dic |\n\tdic",
"suffix": ".\n\tself messages ifNotNil: [ :_messages |\n\t\tdic\n\t\t\tat: #messages\n\t\t\tput: (_messages collect: [ :message | message asJsonableObject ]) ].\n\tself temperature ifNotNil: [ :v... |
1,366 | https://github.com/Evref-BL/Pharo-LLMAPI | 6a85b7bb1e30013d30f9ec93a7d1a00c38d1fdd1 | src/LLM-API/LLMAPIChatObjectPayload.class.st | asJsonableObject
| dic |
dic := Dictionary new.
self messages ifNotNil: [ :_messages |
dic
at: #messages
put: (_messages collect: [ :message | message asJsonableObject ]) ].
self temperature ifNotNil: [ :v | dic at: #temperature put: v ].
self top_p ifNotNil: [ :v | dic at: #top_p put: v ].
self model if... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 7,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "asJsonableObject\n\n\t| dic |\n\tdic := Dictionary new.\n\tself messages ifNotNil: [ :_messages |\n\t\tdic\n\t\t\tat: #messages\n\t\t\tput: (_messages collect: [ :message | message asJsonableObject ]) ].\n\tself temperature ifNotNi... |
1,367 | https://github.com/Evref-BL/Pharo-LLMAPI | fc2d401153823804c537a0237f9af67bf002a412 | src/LLM-API/LLMAPI.class.st | payload
"return the content or a new class for this type of API"
^ self content ifNil: [
self content: self payloadClass new.
self content ] | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 6,
"prefix": "payload\n\t\"return the content or a new class for this type of API\"\n\n\t^ self content ifNil: [\n\t\t self content: self",
"suffix": "",
"completion": " payloadClass new.\n\t\t self content ]"
} |
1,368 | https://github.com/Evref-BL/Pharo-LLMAPI | fc2d401153823804c537a0237f9af67bf002a412 | src/LLM-API/LLMAPI.class.st | payload
"return the content or a new class for this type of API"
^ self content ifNil: [
self content: self payloadClass new.
self content ] | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "payload\n\t\"return the content or a new class for this type of API\"\n\n\t^ self content ifNil: [\n\t\t self",
"suffix": ".\n\t\t self content ]",
"completion": " content: self payloadClass new"
} |
1,369 | https://github.com/Evref-BL/Pharo-LLMAPI | fc2d401153823804c537a0237f9af67bf002a412 | src/LLM-API/LLMAPIFim.class.st | performRequest
self prepareRequest.
self client entity: (ZnEntity json:
(NeoJSONWriter toString: self content asJsonableObject)).
^ self client post | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "performRequest\n\n\tself prepareRequest.\n\tself client entity: (ZnEntity json:",
"suffix": ".\n\t^ self client post",
"completion": "\n\t\t\t (NeoJSONWriter toString: self content asJsonableObject))"
} |
1,370 | https://github.com/Evref-BL/Pharo-LLMAPI | fc2d401153823804c537a0237f9af67bf002a412 | src/LLM-API/LLMAPIFim.class.st | performRequest
self prepareRequest.
self client entity: (ZnEntity json:
(NeoJSONWriter toString: self content asJsonableObject)).
^ self client post | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 1,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "performRequest\n\n\tself prepareRequest.\n\tself client entity: (ZnEntity json:\n\t\t\t (NeoJSONWriter toString: self content asJsonableObject)).\n\t^",
"suffix": "",
"completion": " self client post"
} |
1,371 | https://github.com/Evref-BL/Pharo-LLMAPI | fc2d401153823804c537a0237f9af67bf002a412 | src/LLM-API/LLMAPIFimObjectPayload.class.st | asJsonableObject
| dic |
dic := Dictionary new.
self temperature ifNotNil: [ :v | dic at: #temperature put: v ].
self top_p ifNotNil: [ :v | dic at: #top_p put: v ].
self model ifNotNil: [ :v | dic at: #model put: v ].
self prompt ifNotNil: [ :v | dic at: #prompt put: v ].
self max_tokens ifNotNil: [ :v | dic a... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "asJsonableObject\n\n\t| dic |\n\tdic",
"suffix": ".\n\tself temperature ifNotNil: [ :v | dic at: #temperature put: v ].\n\tself top_p ifNotNil: [ :v | dic at: #top_p put: v ].\n\tself model ifNotNil: [ :v | dic at: #model put: v ].\n\... |
1,372 | https://github.com/Evref-BL/Pharo-LLMAPI | fc2d401153823804c537a0237f9af67bf002a412 | src/LLM-API/LLMAPIFimObjectPayload.class.st | asJsonableObject
| dic |
dic := Dictionary new.
self temperature ifNotNil: [ :v | dic at: #temperature put: v ].
self top_p ifNotNil: [ :v | dic at: #top_p put: v ].
self model ifNotNil: [ :v | dic at: #model put: v ].
self prompt ifNotNil: [ :v | dic at: #prompt put: v ].
self max_tokens ifNotNil: [ :v | dic a... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 10,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "asJsonableObject\n\n\t| dic |\n\tdic := Dictionary new.\n\tself temperature ifNotNil: [ :v | dic at: #temperature put: v ].\n\tself top_p ifNotNil: [ :v | dic at: #top_p put: v ].\n\tself model ifNotNil: [ :v | dic at: #model put:... |
1,373 | https://github.com/Evref-BL/Pharo-LLMAPI | fc2d401153823804c537a0237f9af67bf002a412 | src/LLM-API/LLMAPIFimObjectPayload.class.st | asJsonableObject
| dic |
dic := Dictionary new.
self temperature ifNotNil: [ :v | dic at: #temperature put: v ].
self top_p ifNotNil: [ :v | dic at: #top_p put: v ].
self model ifNotNil: [ :v | dic at: #model put: v ].
self prompt ifNotNil: [ :v | dic at: #prompt put: v ].
self max_tokens ifNotNil: [ :v | dic a... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIChatObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIChatObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed messages response_format tools tool_choice presence_penalty frequence_penalty n... | {
"fim_idx": 7,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "asJsonableObject\n\n\t| dic |\n\tdic := Dictionary new.\n\tself temperature ifNotNil: [ :v | dic at: #temperature put: v ].\n\tself top_p ifNotNil: [ :v | dic at: #top_p put: v ].\n\tself model ifNotNil: [ :v | dic at: #model put: ... |
1,374 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | open
<example>
^ self new open | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "open\n\t<example>\n\t\n\t^",
"suffix": "",
"completion": " self new open"
} |
1,375 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | defaultLayout
^ SpBoxLayout newTopToBottom
add: toolbar expand: false;
add: notebook;
yourself | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 8,
"prefix": "defaultLayout\n\n\t^ SpBoxLayout newTopToBottom\n\t\t add:",
"suffix": "",
"completion": " toolbar expand: false;\n\t\t add: notebook;\n\t\t yourself"
} |
1,376 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | initialExtent
| fontWidth rowHeight |
fontWidth := (StandardFonts defaultFont widthOfString: 'M').
rowHeight := self class inputTextHeight.
^ (40@25) * (fontWidth @ rowHeight) | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "initialExtent\n\n\t| fontWidth rowHeight |\n\tfontWidth := (StandardFonts",
"suffix": ".\n\trowHeight := self class inputTextHeight.\n\n\t^ (40@25) * (fontWidth @ rowHeight)",
"completion": " defaultFont widthOfString: 'M')"
} |
1,377 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | initialExtent
| fontWidth rowHeight |
fontWidth := (StandardFonts defaultFont widthOfString: 'M').
rowHeight := self class inputTextHeight.
^ (40@25) * (fontWidth @ rowHeight) | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "initialExtent\n\n\t| fontWidth rowHeight |\n\tfontWidth := (StandardFonts defaultFont widthOfString: 'M').\n\trowHeight",
"suffix": ".\n\n\t^ (40@25) * (fontWidth @ rowHeight)",
"completion": " := self class inputTextHeight"
} |
1,378 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | initialExtent
| fontWidth rowHeight |
fontWidth := (StandardFonts defaultFont widthOfString: 'M').
rowHeight := self class inputTextHeight.
^ (40@25) * (fontWidth @ rowHeight) | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 2,
"mask_type": "return",
"n_masked_tokens": 8,
"prefix": "initialExtent\n\n\t| fontWidth rowHeight |\n\tfontWidth := (StandardFonts defaultFont widthOfString: 'M').\n\trowHeight := self class inputTextHeight.\n\n\t^ (40@",
"suffix": "",
"completion": "25) * (fontWidth @ rowHeight)"
} |
1,379 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | initializePresenters
notebook := self newNotebook.
toolbar := self newMenuBar.
notebook addPage: (SpNotebookPage
title: 'Chat'
icon: (self iconNamed: #announcement)
provider: [ LLMAPISpecChat new ]) | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initializePresenters\n\n\tnotebook",
"suffix": ".\n\ttoolbar := self newMenuBar.\n\tnotebook addPage: (SpNotebookPage\n\t\t\t title: 'Chat'\n\t\t\t icon: (self iconNamed: #announcement)\n\t\t\t provider: [ LLMAPISpecChat new ])",
"c... |
1,380 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | initializePresenters
notebook := self newNotebook.
toolbar := self newMenuBar.
notebook addPage: (SpNotebookPage
title: 'Chat'
icon: (self iconNamed: #announcement)
provider: [ LLMAPISpecChat new ]) | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initializePresenters\n\n\tnotebook := self newNotebook.\n\ttoolbar",
"suffix": ".\n\tnotebook addPage: (SpNotebookPage\n\t\t\t title: 'Chat'\n\t\t\t icon: (self iconNamed: #announcement)\n\t\t\t provider: [ LLMAPISpecChat new ])",
"... |
1,381 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpec.class.st | initializePresenters
notebook := self newNotebook.
toolbar := self newMenuBar.
notebook addPage: (SpNotebookPage
title: 'Chat'
icon: (self iconNamed: #announcement)
provider: [ LLMAPISpecChat new ]) | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "initializePresenters\n\n\tnotebook := self newNotebook.\n\ttoolbar := self newMenuBar.\n\tnotebook addPage: (SpNotebookPage\n\t\t\t title: 'Chat'\n\t\t\t icon: (self iconNamed: #announcement)\n\t\t\t provider:",
"suffix": "",
"... |
1,382 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | askLLM
| api result resultContent |
history addMessage:
(LLMAPIChatObjectMessage role: 'user' content: inputField text).
api := LLMAPI chat.
api host: 'api.mistral.ai'.
api payload
temperature: 0.5;
model: 'mistral-small-latest';
top_p: 1;
max_tokens: 250;
messages: history model.
result := api perf... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 3,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "askLLM\n\n\t| api result resultContent |\n\thistory addMessage:\n\t\t(LLMAPIChatObjectMessage role: 'user' content: inputField text).\n\tapi := LLMAPI chat.\n\tapi host: 'api.mistral.ai'.\n\tapi payload\n\t\ttemperature: 0.5;\n\t\tmodel... |
1,383 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | askLLM
| api result resultContent |
history addMessage:
(LLMAPIChatObjectMessage role: 'user' content: inputField text).
api := LLMAPI chat.
api host: 'api.mistral.ai'.
api payload
temperature: 0.5;
model: 'mistral-small-latest';
top_p: 1;
max_tokens: 250;
messages: history model.
result := api perf... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 4,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "askLLM\n\n\t| api result resultContent |\n\thistory addMessage:\n\t\t(LLMAPIChatObjectMessage role: 'user' content: inputField text).\n\tapi := LLMAPI chat.\n\tapi host: 'api.mistral.ai'.\n\tapi payload\n\t\ttemperature: 0.5;\n\t\tmodel... |
1,384 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | askLLM
| api result resultContent |
history addMessage:
(LLMAPIChatObjectMessage role: 'user' content: inputField text).
api := LLMAPI chat.
api host: 'api.mistral.ai'.
api payload
temperature: 0.5;
model: 'mistral-small-latest';
top_p: 1;
max_tokens: 250;
messages: history model.
result := api perf... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "askLLM\n\n\t| api result resultContent |\n\thistory addMessage:\n\t\t(LLMAPIChatObjectMessage role: 'user' content: inputField text).\n\tapi",
"suffix": ".\n\tapi host: 'api.mistral.ai'.\n\tapi payload\n\t\ttemperature: 0.5;\n\t\tmode... |
1,385 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | defaultLayout
| submitRow |
submitRow := SpBoxLayout newLeftToRight
add: inputField;
spacing: 5;
add: submitButton withConstraints: [ :constraints |
constraints height: 27.
constraints width: 70 ];
yourself.
^ SpBoxLayout n... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 6,
"prefix": "defaultLayout\n\n\t| submitRow |\n\tsubmitRow := SpBoxLayout newLeftToRight\n\t\t add: inputField;\n\t\t spacing: 5;\n\t\t add: submitButton withConstraints: [ :constraints |\n\t\t\t const... |
1,386 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | defaultLayout
| submitRow |
submitRow := SpBoxLayout newLeftToRight
add: inputField;
spacing: 5;
add: submitButton withConstraints: [ :constraints |
constraints height: 27.
constraints width: 70 ];
yourself.
^ SpBoxLayout n... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 1,
"mask_type": "return",
"n_masked_tokens": 9,
"prefix": "defaultLayout\n\n\t| submitRow |\n\tsubmitRow := SpBoxLayout newLeftToRight\n\t\t add: inputField;\n\t\t spacing: 5;\n\t\t add: submitButton withConstraints: [ :constraints |\n\t\t\t constrain... |
1,387 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | initializePresenters
submitButton := self newButton
label: 'Submit';
icon: (self iconNamed: #glamorousGo);
help: 'Submit prompt to LLM';
action: [ self askLLM ];
yourself.
inputField := self newTextInput.
inputField whenSubmi... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 3,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initializePresenters\n\n\tsubmitButton := self newButton\n\t\t label: 'Submit';\n\t\t icon: (self iconNamed: #glamorousGo);\n\t\t help: 'Submit prompt to LLM';\n\t\t action: [ ... |
1,388 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | initializePresenters
submitButton := self newButton
label: 'Submit';
icon: (self iconNamed: #glamorousGo);
help: 'Submit prompt to LLM';
action: [ self askLLM ];
yourself.
inputField := self newTextInput.
inputField whenSubmi... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 6,
"prefix": "initializePresenters\n\n\tsubmitButton := self newButton\n\t\t label: 'Submit';\n\t\t icon: (self iconNamed: #glamorousGo);\n\t\t help: 'Submit prompt to LLM';\n\t\t action:",
... |
1,389 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChat.class.st | initializePresenters
submitButton := self newButton
label: 'Submit';
icon: (self iconNamed: #glamorousGo);
help: 'Submit prompt to LLM';
action: [ self askLLM ];
yourself.
inputField := self newTextInput.
inputField whenSubmi... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "initializePresenters\n\n\tsubmitButton := self newButton\n\t\t label: 'Submit';\n\t\t icon: (self iconNamed: #glamorousGo);\n\t\t help: 'Submit prompt to LLM';\n\t\t actio... |
1,390 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatBubble.class.st | from: aMessage
^ self basicNew
setModelBeforeInitialization: aMessage;
initialize;
yourself | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 8,
"prefix": "from: aMessage\n\n\t^",
"suffix": "",
"completion": " self basicNew\n\t\tsetModelBeforeInitialization: aMessage;\n\t\tinitialize;\n\t\tyourself"
} |
1,391 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatBubble.class.st | defaultLayout
^ SpBoxLayout newTopToBottom
add: self model role;
"add: roleText expand: false;"add: contentArea expand: false fill: true;
yourself | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 10,
"prefix": "defaultLayout\n\n\t^ SpBoxLayout newTopToBottom\n\t\t add: self model",
"suffix": "",
"completion": " role;\n\t\t \"add: roleText expand: false;\"add: contentArea expand: false fill: true;\n\t\t yourself"
} |
1,392 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatBubble.class.st | initializePresenters
"roleText := self newText .
roleText text: self model role.
roleText editable: false."
contentArea := self newText.
contentArea beWrapWord.
contentArea text: self model content.
contentArea editable: false. | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initializePresenters\n\n\t\"roleText := self newText .\n\troleText text: self model role.\n\troleText editable: false.\"\n\t\n\tcontentArea",
"suffix": ".\n\tcontentArea beWrapWord.\n\tcontentArea text: self model content.\n\tcontentA... |
1,393 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatBubble.class.st | initializePresenters
"roleText := self newText .
roleText text: self model role.
roleText editable: false."
contentArea := self newText.
contentArea beWrapWord.
contentArea text: self model content.
contentArea editable: false. | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "initializePresenters\n\n\t\"roleText := self newText .\n\troleText text: self model role.\n\troleText editable: false.\"\n\t\n\tcontentArea := self newText.\n\tcontentArea beWrapWord.\n\tcontentArea",
"suffix": ".\n\tcontentArea... |
1,394 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatHistory.class.st | from: messages
^ self basicNew
setModelBeforeInitialization: messages;
initialize;
yourself | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 7,
"prefix": "from: messages\n\n\t^ self",
"suffix": "",
"completion": " basicNew\n\t\tsetModelBeforeInitialization: messages;\n\t\tinitialize;\n\t\tyourself"
} |
1,395 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatHistory.class.st | addMessage: aMessage
self model add: aMessage.
panel
add: (LLMAPISpecChatBubble from: aMessage)
at: 0 @ panel children size + 1 | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "addMessage: aMessage\n\n\tself",
"suffix": ".\n\tpanel\n\t\tadd: (LLMAPISpecChatBubble from: aMessage)\n\t\tat: 0 @ panel children size + 1",
"completion": " model add: aMessage"
} |
1,396 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatHistory.class.st | addMessage: aMessage
self model add: aMessage.
panel
add: (LLMAPISpecChatBubble from: aMessage)
at: 0 @ panel children size + 1 | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "addMessage: aMessage\n\n\tself model add: aMessage.\n\tpanel\n\t\tadd: (LLMAPISpecChatBubble from: aMessage)\n\t\tat: 0 @ panel",
"suffix": "",
"completion": " children size + 1"
} |
1,397 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatHistory.class.st | defaultLayout
^ SpScrollableLayout with: (SpBoxLayout newTopToBottom
add: panel;
yourself) | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 5,
"prefix": "defaultLayout\n\n\t^ SpScrollableLayout with: (SpBoxLayout newTopToBottom",
"suffix": "",
"completion": "\n\t\t\t add: panel;\n\t\t\t yourself)"
} |
1,398 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatHistory.class.st | initializePresenters
panel := (SpGridLayout build: [ :builder |
builder beRowNotHomogeneous.
self model
do: [ :message |
builder add: (LLMAPISpecChatBubble from: message) ]
separatedBy: [ builder nextRow ] ])
columnSpacing: 0;
... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 8,
"prefix": "initializePresenters\n\n\tpanel := (SpGridLayout build: [ :builder |\n\t\t\t builder beRowNotHomogeneous.\n\t\t\t self model\n\t\t\t\t do: [ :message |\n\t\t\t\t\t builder add: (LLMAPISpecChatBubble f... |
1,399 | https://github.com/Evref-BL/Pharo-LLMAPI | 7fd60fdf4e6d5bb32a1a6b931f0c827fc7ed2dc7 | src/LLM-Spec/LLMAPISpecChatHistory.class.st | initializePresenters
panel := (SpGridLayout build: [ :builder |
builder beRowNotHomogeneous.
self model
do: [ :message |
builder add: (LLMAPISpecChatBubble from: message) ]
separatedBy: [ builder nextRow ] ])
columnSpacing: 0;
... | [
{
"filepath": "repo_clone/Pharo-LLMAPI/src/LLM-API/LLMAPIFimObjectPayload.class.st",
"code": "LLMAPIObject subclass: #LLMAPIFimObjectPayload\n\tinstanceVariableNames: 'model temperature top_p max_tokens stream stop random_seed prompt suffix min_tokenss'\n\tclassVariableNames: ''\n\tpackage: 'LLM-API'"
},
... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 10,
"prefix": "initializePresenters\n\n\tpanel := (SpGridLayout build: [ :builder |\n\t\t\t builder beRowNotHomogeneous.\n\t\t\t self model\n\t\t\t\t do: [ :message |\n\t\t\t\t\t builder add: (",
"suffix": "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.