--- title: "injectChatLabels" description: "Angular function that returns the CopilotKit chat labels, with provided overrides merged over the defaults" --- ## Overview `injectChatLabels` returns the full set of [`CopilotChatLabels`](/reference/angular/functions/provideCopilotChatLabels#parameters) in scope: any labels you provided through [`provideCopilotChatLabels`](/reference/angular/functions/provideCopilotChatLabels) merged over `COPILOT_CHAT_DEFAULT_LABELS`. If no labels were provided, it returns the defaults unchanged. It reads the `COPILOT_CHAT_LABELS` injection token (optionally), so it must run inside an Angular injection context (a constructor, a field initializer, or a factory). The prebuilt chat components call it internally; use it directly when you build your own chat UI and want the same configurable strings. ## Signature ```ts import { injectChatLabels } from "@copilotkit/angular"; function injectChatLabels(): CopilotChatLabels; ``` ## Return Value Returns a complete `CopilotChatLabels` object. Because the value is the merge of your overrides over the defaults, every field is always present (never `undefined`). ## Usage Call it from an injection context and read the labels you need. ```ts title="src/app/my-chat.component.ts" import { Component } from "@angular/core"; import { injectChatLabels } from "@copilotkit/angular"; @Component({ selector: "app-my-chat", standalone: true, template: ``, }) export class MyChatComponent { protected readonly labels = injectChatLabels(); } ``` ## Related