Build the minimum headers required by the gateway.
(api_key: str, conversation_id: str | None)
| 39 | |
| 40 | |
| 41 | def build_headers(api_key: str, conversation_id: str | None) -> dict[str, str]: |
| 42 | """Build the minimum headers required by the gateway.""" |
| 43 | headers = { |
| 44 | "Authorization": f"Bearer {api_key}", |
| 45 | } |
| 46 | if conversation_id: |
| 47 | headers["conversation_id"] = conversation_id |
| 48 | return headers |
| 49 | |
| 50 | |
| 51 | def build_chat_payload( |