Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit1901 committed May 24, 2024
1 parent 09e2d73 commit 8ee0e63
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ export class Ollama extends OllamaBrowser {
mfDir: string,
): Promise<string> {
const path = this.resolvePath(args, mfDir)
if (await fileExists(path)) {
return `${command} @${await this.createBlob(path)}`
const exists = await fileExists(path)
if (exists) {
const blob = await this.createBlob(path)
return `${command} @${blob}`
}
return `${command} ${args}`
}
Expand Down Expand Up @@ -200,5 +202,5 @@ export class Ollama extends OllamaBrowser {

export default new Ollama()

// export all types from the main entry point so that packages importing types dont need to specify paths
// export all types from the main entry point so that packages importing types don't need to specify paths
export * from './interfaces.js'

0 comments on commit 8ee0e63

Please sign in to comment.