Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Nov 19, 2024
1 parent a27a865 commit cb0849e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,37 +105,5 @@ otherwise they would be overwritten upon the next generated release. Feel free t
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
an issue first to discuss with us!
On the other hand, contributions to the README are always very welcome!
## Advanced
### Timeouts
Setting a timeout for each individual request is as simple as
using the standard \`context\` library. Setting a one second timeout
for an individual API call looks like the following:
\`\`\`go
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
response, err := client.Chat(
ctx,
&fern.ChatRequest{
Message: "Can you give me a global market overview of solar panels?",
},
)
\`\`\`
\`\`\`go
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
response, err := client.Generate(
ctx,
&fern.GenerateRequest{
Prompt: "Please explain to me how LLMs work",
},
)
\`\`\`
"
On the other hand, contributions to the README are always very welcome!"
`;
2 changes: 1 addition & 1 deletion clis/generator-cli/src/readme/ReadmeGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { BlockMerger } from "./BlockMerger";
import { ReadmeParser } from "./ReadmeParser";

export class ReadmeGenerator {
private static readonly ADVANCED_FEATURE_ID = "advanced";
private static readonly ADVANCED_FEATURE_ID = "ADVANCED";
private ADVANCED_FEATURES: Set<FernGeneratorCli.FeatureId> = new Set([
FernGeneratorCli.StructuredFeatureId.Retries,
FernGeneratorCli.StructuredFeatureId.Timeouts,
Expand Down

0 comments on commit cb0849e

Please sign in to comment.