C
claude-cookbooks
Claude AI cookbooks - code examples, tutorials, and best practices for using Claude API. Use when learning Claude API integration, building Claude-powered applications, or exploring Claude capabilities.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Claude AI cookbooks - code examples, tutorials, and best practices for using Claude API. Use when learning Claude API integration, building Claude-powered applications, or exploring Claude capabilities.
How to use
- Zainstaluj bibliotekę Anthropic dla Python: pip install anthropic. 2. Utwórz instancję klienta, przekazując swój klucz API: client = anthropic.Anthropic(api_key="twój-klucz"). 3. Dla podstawowej wiadomości użyj client.messages.create() z parametrami model, max_tokens i messages zawierającą treść pytania. 4. Aby dodać tool use (function calling), zdefiniuj listę narzędzi z nazwą, opisem i schematem JSON, a następnie przekaż ją w parametrze tools przy tworzeniu wiadomości. 5. Do analizy obrazów dodaj obraz w wiadomości jako content z typem image i source zawierającym dane obrazu. 6. Sprawdzaj dokumentację Anthropic cookbooks dla zaawansowanych wzorców takich jak prompt caching, sub-agenty i implementacja RAG.