Skip to content

Commit 24285c4

Browse files
committed
Rename Facade classes to Builder classes, as more suitable name despite not formally using the builder pattern.
1 parent b13e070 commit 24285c4

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/ARCHITECTURE.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,11 @@ classDiagram
212212
direction LR
213213
namespace Ai {
214214
class AiEntrypoint {
215-
+prompt(?string $text) PromptFacade$
216-
+message(?string $text) MessageFacade$
215+
+prompt(?string $text) PromptBuilder$
216+
+message(?string $text) MessageBuilder$
217217
}
218218
219-
class PromptFacade {
219+
class PromptBuilder {
220220
+withText(string $text) self
221221
+withImageFile(File $file) self
222222
+withAudioFile(File $file) self
@@ -255,7 +255,7 @@ direction LR
255255
+generateEmbeddings() Embedding[]
256256
}
257257
258-
class MessageFacade {
258+
class MessageBuilder {
259259
+usingRole(MessageRole $role) self
260260
+withText(string $text) self
261261
+withImageFile(File $file) self
@@ -268,8 +268,8 @@ direction LR
268268
}
269269
}
270270
271-
AiEntrypoint .. PromptFacade : creates
272-
AiEntrypoint .. MessageFacade : creates
271+
AiEntrypoint .. PromptBuilder : creates
272+
AiEntrypoint .. MessageBuilder : creates
273273
```
274274

275275
### Overview: Traditional method call API for AI consumption
@@ -348,8 +348,8 @@ classDiagram
348348
direction LR
349349
namespace Ai {
350350
class AiEntrypoint {
351-
+prompt(?string $text) PromptFacade$
352-
+message(?string $text) MessageFacade$
351+
+prompt(?string $text) PromptBuilder$
352+
+message(?string $text) MessageBuilder$
353353
+defaultRegistry() AiProviderRegistry$
354354
+isConfigured(AiProviderAvailability $availability) bool$
355355
+generateResult(string|MessagePart|MessagePart[]|Message|Message[] $prompt, AiModel $model) GenerativeAiResult$
@@ -367,7 +367,7 @@ direction LR
367367
+generateEmbeddingsOperation(string[]|Message[] $input, AiModel $model) EmbeddingOperation$
368368
}
369369
370-
class PromptFacade {
370+
class PromptBuilder {
371371
+withText(string $text) self
372372
+withImageFile(File $file) self
373373
+withAudioFile(File $file) self
@@ -406,7 +406,7 @@ direction LR
406406
+generateEmbeddings() Embedding[]
407407
}
408408
409-
class MessageFacade {
409+
class MessageBuilder {
410410
+usingRole(MessageRole $role) self
411411
+withText(string $text) self
412412
+withImageFile(File $file) self
@@ -592,17 +592,17 @@ direction LR
592592
593593
AiEntrypoint .. Message : receives
594594
AiEntrypoint .. MessagePart : receives
595-
AiEntrypoint .. PromptFacade : creates
596-
AiEntrypoint .. MessageFacade : creates
595+
AiEntrypoint .. PromptBuilder : creates
596+
AiEntrypoint .. MessageBuilder : creates
597597
AiEntrypoint .. GenerativeAiResult : creates
598598
AiEntrypoint .. EmbeddingResult : creates
599599
AiEntrypoint .. GenerativeAiOperation : creates
600600
AiEntrypoint .. EmbeddingOperation : creates
601-
PromptFacade .. GenerativeAiResult : creates
602-
PromptFacade .. EmbeddingResult : creates
603-
PromptFacade .. GenerativeAiOperation : creates
604-
PromptFacade .. EmbeddingOperation : creates
605-
MessageFacade .. Message : creates
601+
PromptBuilder .. GenerativeAiResult : creates
602+
PromptBuilder .. EmbeddingResult : creates
603+
PromptBuilder .. GenerativeAiOperation : creates
604+
PromptBuilder .. EmbeddingOperation : creates
605+
MessageBuilder .. Message : creates
606606
Message "1" *-- "1..*" MessagePart
607607
MessagePart "1" o-- "0..1" InlineFile
608608
MessagePart "1" o-- "0..1" RemoteFile

0 commit comments

Comments
 (0)