Skip to content

Commit

Permalink
Add file state (#316)
Browse files Browse the repository at this point in the history
* Add file state

Change-Id: I0fd786bab6f14184a6034bc086a82ac827adbc11

* Update google/generativeai/types/file_types.py
  • Loading branch information
MarkDaoust authored May 7, 2024
1 parent ecb57a5 commit b094e0f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions google/generativeai/types/file_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def sha256_hash(self) -> bytes:
def uri(self) -> str:
return self._proto.uri

@property
def state(self) -> glm.File.State:
return self._proto.state

def delete(self):
client = get_default_file_client()
client.delete_file(name=self.name)

0 comments on commit b094e0f

Please sign in to comment.