Adding an Anthropic API key

The API key should be provided as a text file that contains only that key string and nothing else. By default, the file is at Path * '.secrets' / 'anthropic-api-key.txt'.

You can store the key programmatically using the following snippet:

apiKey := ''.
fileReference := GtAnthropicClient apiKeyFile.
fileReference parent ensureCreateDirectory. 
fileReference ensureDelete writeStreamDo: [ :s | s nextPutAll: apiKey ]
  

Once set, you can test the key by trying to inspect the client:

GtLAnthropicClient withApiKeyFromFile