MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetFile

Method GetFile

dto/openai_request.go:171–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169}
170
171func (m *MediaContent) GetFile() *MessageFile {
172 if m.File != nil {
173 if _, ok := m.File.(*MessageFile); ok {
174 return m.File.(*MessageFile)
175 }
176 if itemMap, ok := m.File.(map[string]any); ok {
177 out := &MessageFile{
178 FileName: common.Interface2String(itemMap["file_name"]),
179 FileData: common.Interface2String(itemMap["file_data"]),
180 FileId: common.Interface2String(itemMap["file_id"]),
181 }
182 return out
183 }
184 }
185 return nil
186}
187
188type MessageImageUrl struct {
189 Url string `json:"url"`

Callers 1

CovertGemini2OpenAIFunction · 0.80

Calls 1

Interface2StringFunction · 0.92

Tested by

no test coverage detected