diff --git a/clis/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap b/clis/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap index 5bdedc67af..1ebd543d4b 100644 --- a/clis/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap +++ b/clis/generator-cli/src/__test__/__snapshots__/cohere-go.test.ts.snap @@ -8,7 +8,9 @@ exports[`cohere-go > cohere-go > generate readme 1`] = ` [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern) [![go shield](https://img.shields.io/badge/go-docs-blue)](https://pkg.go.dev/github.com/cohere-ai/cohere-go) -The Cohere Go library provides convenient access to the Cohere API from Go. +The Cohere Go SDK allows access to Cohere models across many different platforms: the cohere platform, +AWS (Bedrock, Sagemaker), Azure, GCP and Oracle OCI. For a full list of support and snippets, please +take a look at the [SDK support docs](https://docs.cohere.com/docs/cohere-works-everywhere) page. ## Documentation diff --git a/clis/generator-cli/src/__test__/fixtures/cohere-go/readme.json b/clis/generator-cli/src/__test__/fixtures/cohere-go/readme.json index 9eb6fbe22e..d7d951263b 100644 --- a/clis/generator-cli/src/__test__/fixtures/cohere-go/readme.json +++ b/clis/generator-cli/src/__test__/fixtures/cohere-go/readme.json @@ -9,6 +9,7 @@ "version": "2.5.2" } }, + "introduction": "The Cohere Go SDK allows access to Cohere models across many different platforms: the cohere platform,\nAWS (Bedrock, Sagemaker), Azure, GCP and Oracle OCI. For a full list of support and snippets, please\ntake a look at the [SDK support docs](https://docs.cohere.com/docs/cohere-works-everywhere) page.", "organization": "cohere", "bannerLink": "https://raw.githubusercontent.com/cohere-ai/cohere-typescript/5188b11a6e91727fdd4d46f4a690419ad204224d/banner.png", "apiReferenceLink": "https://docs.cohere.com", diff --git a/clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts index a4d849129b..22250f4aa9 100644 --- a/clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts +++ b/clis/generator-cli/src/configuration/generated/api/resources/readme/types/ReadmeConfig.ts @@ -17,6 +17,7 @@ export interface ReadmeConfig { language: FernGeneratorCli.LanguageInfo; organization: string; bannerLink?: string; + introduction?: string; apiReferenceLink?: string; requirements?: string[]; /** diff --git a/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts index 12d34aa9f5..8968abbc03 100644 --- a/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts +++ b/clis/generator-cli/src/configuration/generated/serialization/resources/readme/types/ReadmeConfig.ts @@ -17,6 +17,7 @@ export const ReadmeConfig: core.serialization.ObjectSchema< language: LanguageInfo, organization: core.serialization.string(), bannerLink: core.serialization.string().optional(), + introduction: core.serialization.string().optional(), apiReferenceLink: core.serialization.string().optional(), requirements: core.serialization.list(core.serialization.string()).optional(), features: core.serialization.list(ReadmeFeature).optional(), @@ -28,6 +29,7 @@ export declare namespace ReadmeConfig { language: LanguageInfo.Raw; organization: string; bannerLink?: string | null; + introduction?: string | null; apiReferenceLink?: string | null; requirements?: string[] | null; features?: ReadmeFeature.Raw[] | null; diff --git a/clis/generator-cli/src/readme/ReadmeGenerator.ts b/clis/generator-cli/src/readme/ReadmeGenerator.ts index 691590b26f..940d94ea6b 100644 --- a/clis/generator-cli/src/readme/ReadmeGenerator.ts +++ b/clis/generator-cli/src/readme/ReadmeGenerator.ts @@ -141,10 +141,7 @@ export class ReadmeGenerator { }); } writer.writeLine(); - writer.writeLine( - `The ${this.organizationPascalCase} ${this.languageTitle} library provides convenient access to the ${this.organizationPascalCase} API from ${this.languageTitle}.`, - ); - writer.writeLine(); + this.writeIntroudction({ writer }); } private writeBanner({ writer, bannerLink }: { writer: Writer; bannerLink: string }): void { @@ -158,6 +155,15 @@ export class ReadmeGenerator { ); } + private writeIntroudction({ writer }: { writer: Writer }): void { + writer.writeLine( + this.readmeConfig.introduction != null + ? this.readmeConfig.introduction + : `The ${this.organizationPascalCase} ${this.languageTitle} library provides convenient access to the ${this.organizationPascalCase} API from ${this.languageTitle}.`, + ); + writer.writeLine(); + } + private generateDocumentation({ docsLink }: { docsLink: string }): Block { const writer = new StringWriter(); writer.writeLine("## Documentation"); diff --git a/fern/apis/generator-cli/definition/readme.yml b/fern/apis/generator-cli/definition/readme.yml index 204f94850d..c289043b40 100644 --- a/fern/apis/generator-cli/definition/readme.yml +++ b/fern/apis/generator-cli/definition/readme.yml @@ -16,6 +16,7 @@ types: language: LanguageInfo organization: string bannerLink: optional + introduction: optional apiReferenceLink: optional requirements: optional> features: