Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Document limitation of image_url content type in Orchestration #524

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/orchestration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@

Many models in the orchestration service have image recognition capabilities, meaning the models can take images and answer questions about them.

> [!Warning]

Check warning on line 223 in packages/orchestration/README.md

View workflow job for this annotation

GitHub Actions / grammar-check

[vale] reported by reviewdog 🐶 [SAP.Spacing] '!W' should have one space. Raw Output: {"message": "[SAP.Spacing] '!W' should have one space.", "location": {"path": "packages/orchestration/README.md", "range": {"start": {"line": 223, "column": 4}}}, "severity": "WARNING"}
> The `image_url` content type can only be used in messages with `role: 'user'`.
> Attempting to use `image_url` in non-user messages will result in an error.

```ts
import { OrchestrationClient } from '@sap-ai-sdk/orchestration';

Expand All @@ -230,7 +234,7 @@
templating: {
template: [
{
role: 'user',
role: 'user', // image_url content type is only supported in user messages
content: [
{
type: 'text',
Expand Down
2 changes: 1 addition & 1 deletion sample-code/src/orchestration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ export async function orchestrationChatCompletionImage(): Promise<OrchestrationR
templating: {
template: [
{
role: 'user',
role: 'user', // image_url content type is only supported in user messages
content: [
{
type: 'text',
Expand Down
Loading