Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2025夏 Foundation Models Framework体験記

Avatar for Yomogi. Yomogi.
August 06, 2025
66

2025夏 Foundation Models Framework体験記

Sansan x DMM.swift #2

合同会社DMM.com 柴田大輝

Avatar for Yomogi.

Yomogi.

August 06, 2025
Tweet

Transcript

  1. ÷ýõ³üû ÷o /Ÿ(@yomoceseran) \\_DMM.com iOS z DMM öó¿¹²÷ú Î~1 o

    Android ³ iOS ²÷ú¸ó¸û²{zº~w gß~ëwþó¼<ßo~ÿ= zu³¯³w ¶óvzsv{wt
  2. Foundation Models Framework ~zu¹t WWDC25 w~è Apple /k¿žò÷ûxö½¹ø{¸sv²¿»¹w}» 2025/08 ÿ1Xcode26³4

    xmacOS Tahoe26 w×_úw}» ³5 û~w Apple Developer Documentation Foundation Models | Apple Developer Documentation Perform tasks with the on-device model that specializes in language understanding, structured output, and tool calling.
  3. /Ïz3 t~‰} 1 ºó÷ð´¹ ºó÷ð´¹w×_w1÷ð´¹ ~CPU/GPU ²svëÞ 2 ýóøçÿO‰ ´ó¿üýóø{çÿ|O‰z

    ±1ÿo~šïöí{ß[wzt 3 ÷ù´ð·üßÿ ÿoÕwß}y»±÷ù´ð· üßÿ|Oy ?zLLM ²ÿo~xôۀqwvsx|w}»
  4. Foundation Models Framework ~to 3 ¯~³üù²þpq 1. FoundationModels ~import 2.

    session ~_r 3. session {ÿwvrespond ñ½óùw÷ýó÷ø²oy ³ response.content {¹or}ÿ²×ßy»sx|w}»
  5. Ûy{sv±~ÿ÷Û Foundation Models Framework {guardrail xtvß}|r» ´ºxº²y»ow÷úÁüøzåy{²u~»ùwñ·ó¿w1guardrail {÷ïw²~¸ùüxwvß} à{²ÿóùúóÀw}»¸ùü Apple

    Developer Documentation LanguageModelSession.GenerationError | Apple Developer Documentation An error that occurs while generating a response.
  6. input / output ²vÖwvÛy{v input öü¶{¹¯uzö½¹ø²×q×»~wz1 Þ}tsx~Yܲ²÷úNwówø³w²¹v¸v{y» e.g.) ü¿ówö½¹øYܲø³w²¹v output

    ÷ýó÷ø²oyŸ{ß~YܲgÛy» öü¹±ü¹{ßxvßy»ß~ß²~±vz e.g) instructions xwvSession ~¯f{gÛ'respond f{þ¯~struct ²gÛ
  7. guardrails ~»¹¿ð²^gö{w}»( {²ÿ) ³4 {vúwx} .default w{Ûÿ|q{s|1ÿfù~gõ ³5 w permissiveContentTransformations

    |ÿòu¼ Îß²ÿòu¼vtsx|Îóu¼»~w1÷ýð¿ø|ys~w~ù´ó²»ûw}»{wtVq»sx|óÛu¼» Session ~¯f{gÛ guardrail types