Skip to content

Commit

Permalink
Merge pull request #9 from jmorganca/destination
Browse files Browse the repository at this point in the history
s/target/destination/
  • Loading branch information
mxyng authored Jan 12, 2024
2 parents fc60bd7 + 582839f commit 53b10f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ollama/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ def delete(self, model: str) -> Mapping[str, Any]:
def list(self) -> Mapping[str, Any]:
return self._request('GET', '/api/tags').json()

def copy(self, source: str, target: str) -> Mapping[str, Any]:
response = self._request('POST', '/api/copy', json={'source': source, 'destination': target})
def copy(self, source: str, destination: str) -> Mapping[str, Any]:
response = self._request('POST', '/api/copy', json={'source': source, 'destination': destination})
return {'status': 'success' if response.status_code == 200 else 'error'}

def show(self, model: str) -> Mapping[str, Any]:
Expand Down Expand Up @@ -575,8 +575,8 @@ async def list(self) -> Mapping[str, Any]:
response = await self._request('GET', '/api/tags')
return response.json()

async def copy(self, source: str, target: str) -> Mapping[str, Any]:
response = await self._request('POST', '/api/copy', json={'source': source, 'destination': target})
async def copy(self, source: str, destination: str) -> Mapping[str, Any]:
response = await self._request('POST', '/api/copy', json={'source': source, 'destination': destination})
return {'status': 'success' if response.status_code == 200 else 'error'}

async def show(self, model: str) -> Mapping[str, Any]:
Expand Down

0 comments on commit 53b10f7

Please sign in to comment.