Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix typos and spelling errors #5520

Merged
merged 5 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/remix-ai-core/src/types/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export enum ModelType {
CODE_COMPLETION_INSERTION = 'code_completion_insertion',
}

export const COMPLETION_SYSTEM_PROMPT = "You are a Solidity AI Assistant that complete user code with provided context. You provide accurate solution and always answer as helpfully as possible, while being safe. You only provide code using this context:\n"
export const COMPLETION_SYSTEM_PROMPT = "You are a Solidity AI Assistant that completes user code with provided context. You provide accurate solution and always answer as helpfully as possible, while being safe. You only provide code using this context:\n"
6 changes: 3 additions & 3 deletions libs/remix-ai-core/src/types/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DefaultModels = (): IModel[] => {
};

const model3: IModel = {
name: 'llaama3.1_8B',
name: 'llama3.1_8B',
modelOP: RemoteBackendOPModel.CODELLAMA,
task: 'text-generation',
modelName: 'llama3_1_8B-q4_0.gguf',
Expand All @@ -36,7 +36,7 @@ const DefaultModels = (): IModel[] => {
};

const model4: IModel = {
name: 'llaama3.1_8B_instruct',
name: 'llama3.1_8B_instruct',
modelOP: RemoteBackendOPModel.CODELLAMA,
task: 'text-generation',
modelName: 'llama3_1_8B-q4_0_instruct.gguf',
Expand Down Expand Up @@ -82,4 +82,4 @@ const GenerationParams:IParams = {
terminal_output: false,
}

export { DefaultModels, CompletionParams, InsertionParams, GenerationParams }
export { DefaultModels, CompletionParams, InsertionParams, GenerationParams }
2 changes: 1 addition & 1 deletion libs/remix-ai-core/src/types/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// model implementation for the model selection component

import exp from 'constants';
import constants from 'constants';
import { ModelType } from './constants';

export interface IModelRequirements{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {

type WrapFunction = ((contracts: ContractHLAst[], isSameName: boolean, version: string) => ReportObj[])

export default class abstractAstView {
export default class AbstractAstView {
contracts: ContractHLAst[] = []
currentContractIndex = -1
currentFunctionIndex = -1
Expand Down Expand Up @@ -91,7 +91,7 @@ export default class abstractAstView {
parameters: this.getLocalParameters(node)
})
} else if (node.nodeType === 'ModifierInvocation') {
if (!this.isFunctionNotModifier) throw new Error('abstractAstView.js: Found modifier invocation outside of function scope.')
if (!this.isFunctionNotModifier) throw new Error('AbstractAstView.js: Found modifier invocation outside of function scope.')
this.getCurrentFunction().modifierInvocations.push(node)
} else if (relevantNodeFilter(node)) {
let scope: FunctionHLAst | ModifierHLAst | ContractHLAst = (this.isFunctionNotModifier) ? this.getCurrentFunction() : this.getCurrentModifier()
Expand Down Expand Up @@ -130,15 +130,15 @@ export default class abstractAstView {
if (inheritsFrom) {
currentContract.stateVariables = currentContract.stateVariables.concat(inheritsFrom.stateVariables)
} else {
console.log('abstractAstView.js: could not find contract definition inherited from ' + inheritsFromName)
console.log('AbstractAstView.js: could not find contract definition inherited from ' + inheritsFromName)
}
})
}

private setCurrentContract (contract: ContractHLAst): void {
const name: string = getContractName(contract.node)
if (this.contracts.map((c: ContractHLAst) => getContractName(c.node)).filter((n) => n === name).length > 0) {
console.log('abstractAstView.js: two or more contracts with the same name detected, import aliases not supported at the moment')
console.log('AbstractAstView.js: two or more contracts with the same name detected, import aliases not supported at the moment')
this.multipleContractsWithSameName = true
}
this.currentContractIndex = (this.contracts.push(contract) - 1)
Expand Down