axflow

The TypeScript framework for AI development

MIT License

Downloads
1.1K
Stars
1.1K
Committers
3

Bot releases are hidden (Show)

axflow - Add support for Gemini Latest Release

Published by benjreinhart 10 months ago

import { StreamToIterable } from '@axflow/models/shared';
import { GoogleGenerateContent } from '@axflow/models/google/generate-content';

const stream = await GoogleGenerateContent.stream(
  {
    model: 'gemini-pro',
    contents: [
      {
        parts: [
          {
            text: 'Write a two sentence story about a magic backpack',
          },
        ],
      },
    ],
  },
  {
    apiKey: process.env.GOOGLE_API_KEY,
  }
);

for await (const chunk of StreamToIterable(stream)) {
  console.log(chunk);
}
axflow - Add support for Together.ai inference endpoints

Published by benjreinhart 10 months ago

For example, we can run Llama2 70B on Together's inference endpoint with:

import { StreamToIterable } from '@axflow/models/shared';
import { TogetherAIInference } from '@axflow/models/togetherai/inference';

const stream = await TogetherAIInference.stream(
  {
    model: 'togethercomputer/llama-2-70b-chat',
    prompt: '[INST] Using no more than 20 words, what is the Eiffel tower? [/INST] ',
    max_tokens: 250,
  },
  {
    apiKey: process.env.TOGETHERAI_API_KEY,
  }
);

for await (const chunk of StreamToIterable(stream)) {
  console.log(chunk);
}
axflow - @axflow/models 0.0.23

Published by nichochar 11 months ago

Support openAI tools:

  • Multiple tools per API call
  • Support streaming partial tools with new toolCallsAccessor callback
axflow - Support new openAI types after dev day

Published by nichochar 12 months ago

OpenAI made some changes to their SDK during their 2023 dev day, Axflow now supports them:

  • Renaming of functions to tools
  • Support for json_mode
  • Support for seed and deterministic calls
axflow - Support Cohere v3 embedding models

Published by benjreinhart 12 months ago

axflow - Add createMessage utility

Published by benjreinhart 12 months ago

axflow - Support reloading system messages in useChat hook

Published by benjreinhart 12 months ago

axflow - Support OpenAI functions in useChat hook

Published by benjreinhart about 1 year ago

axflow - Add reload functionality for useChat

Published by benjreinhart about 1 year ago

axflow - System message and callback for new messages

Published by benjreinhart about 1 year ago

axflow - Azure support + message on change callbacks

Published by benjreinhart about 1 year ago

axflow - Support loading and error states for useChat

Published by benjreinhart about 1 year ago

axflow - Support abort signals to abort fetch requests

Published by benjreinhart about 1 year ago

axflow - Support HuggingFace TextGeneration APIs

Published by benjreinhart about 1 year ago

axflow - Support custom headers for model invocations

Published by benjreinhart about 1 year ago

axflow - Enable support for Node.js envs like Express.js

Published by benjreinhart about 1 year ago

Introduce a streamJsonResponse function that can pipe a ReadableStream through a Node.js ServerResponse object, enabling seamless integration for environments using the Node.js standard library, like Express.js.

axflow - Update useChat hook in @axflow/models

Published by benjreinhart about 1 year ago

axflow - @axflow/models initial release

Published by benjreinhart about 1 year ago

axflow - Fix Axgen package exports

Published by benjreinhart about 1 year ago

axflow - Cohere embedding model and minor tweaks

Published by benjreinhart about 1 year ago