@blinkdotnew/sdk 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1705,7 +1705,7 @@ var BlinkAIImpl = class {
1705
1705
  * @param options - An object containing either:
1706
1706
  * - `prompt`: a simple string prompt
1707
1707
  * - OR `messages`: an array of chat messages for conversation
1708
- * - Plus optional model, maxTokens, temperature, signal parameters
1708
+ * - Plus optional model, search, maxSteps, experimental_continueSteps, maxTokens, temperature, signal parameters
1709
1709
  *
1710
1710
  * @example
1711
1711
  * ```ts
@@ -1756,6 +1756,22 @@ var BlinkAIImpl = class {
1756
1756
  * maxTokens: 150,
1757
1757
  * temperature: 0.7
1758
1758
  * });
1759
+ *
1760
+ * // With web search (OpenAI models only)
1761
+ * const { text, sources } = await blink.ai.generateText({
1762
+ * prompt: "What are the latest developments in AI?",
1763
+ * model: "gpt-4o-mini",
1764
+ * search: true // Enables web search
1765
+ * });
1766
+ *
1767
+ * // With advanced multi-step configuration
1768
+ * const { text } = await blink.ai.generateText({
1769
+ * prompt: "Research and analyze recent tech trends",
1770
+ * model: "gpt-4o",
1771
+ * search: true,
1772
+ * maxSteps: 10, // Allow up to 10 reasoning steps
1773
+ * experimental_continueSteps: true // Enable continued reasoning
1774
+ * });
1759
1775
  * ```
1760
1776
  *
1761
1777
  * @returns Promise<TextGenerationResponse> - Object containing:
@@ -1777,6 +1793,9 @@ var BlinkAIImpl = class {
1777
1793
  const requestBody = {
1778
1794
  model: options.model,
1779
1795
  stream: false,
1796
+ search: options.search,
1797
+ maxSteps: options.maxSteps,
1798
+ experimental_continueSteps: options.experimental_continueSteps,
1780
1799
  maxTokens: options.maxTokens,
1781
1800
  temperature: options.temperature,
1782
1801
  signal: options.signal
@@ -1812,7 +1831,7 @@ var BlinkAIImpl = class {
1812
1831
  /**
1813
1832
  * Streams text generation with real-time updates as the AI generates content.
1814
1833
  *
1815
- * @param options - Same as generateText: either `prompt` or `messages` with optional parameters
1834
+ * @param options - Same as generateText: either `prompt` or `messages` with optional parameters including search, maxSteps, experimental_continueSteps
1816
1835
  * @param onChunk - Callback function that receives each text chunk as it's generated
1817
1836
  *
1818
1837
  * @example
@@ -1855,6 +1874,9 @@ var BlinkAIImpl = class {
1855
1874
  {
1856
1875
  model: options.model,
1857
1876
  messages: options.messages,
1877
+ search: options.search,
1878
+ maxSteps: options.maxSteps,
1879
+ experimental_continueSteps: options.experimental_continueSteps,
1858
1880
  maxTokens: options.maxTokens,
1859
1881
  temperature: options.temperature,
1860
1882
  signal: options.signal