chansung commited on
Commit
bc7f236
·
verified ·
1 Parent(s): 1c1a558

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -38,15 +38,15 @@ async def echo(message, history, state, persona):
38
  attached_file = find_attached_file(filename, state["attached_files"])
39
  if attached_file is None:
40
  path_gcp = await client.files.upload(path=path_local)
41
- path_gcp = types.Part.from_uri(
42
  file_uri=path_gcp.name, mime_type=path_gcp.mime_type
43
  ),
44
  state["attached_files"].append({
45
  "name": filename,
46
  "path_local": path_local,
47
  "gcp_entity": path_gcp,
48
- "path_gcp": path_gcp,
49
- "mime_type=": path_gcp.mime_type,
50
  "expiration_time": path_gcp.expiration_time,
51
  })
52
  attached_file = path_gcp
 
38
  attached_file = find_attached_file(filename, state["attached_files"])
39
  if attached_file is None:
40
  path_gcp = await client.files.upload(path=path_local)
41
+ path_wrap = types.Part.from_uri(
42
  file_uri=path_gcp.name, mime_type=path_gcp.mime_type
43
  ),
44
  state["attached_files"].append({
45
  "name": filename,
46
  "path_local": path_local,
47
  "gcp_entity": path_gcp,
48
+ "path_gcp": path_wrap,
49
+ "mime_type": path_gcp.mime_type,
50
  "expiration_time": path_gcp.expiration_time,
51
  })
52
  attached_file = path_gcp