Git Product home page Git Product logo

Comments (2)

martinezpl avatar martinezpl commented on August 17, 2024

Currently, in order to use a model in local container (or any other model online), you'd have to overwrite the functions here:

https://github.com/a16z-infra/ai-town/blob/main/convex/lib/openai.ts

These are the only LLM entrypoints in the repo, so customising them to use your API is enough.

Similarly with the vector DB, seems like all the relevant functions are here:

https://github.com/a16z-infra/ai-town/blob/main/convex/lib/pinecone.ts

So you can customise queryVectors to query your database instead of pinecone and so on.

You change these two files and I think that's basically it. Now the question is, what can be done to generalise support for custom 3rd parties, so that it's easier and allows people to add integrations?

from ai-town.

ianmacartney avatar ianmacartney commented on August 17, 2024

Would folks be ok mapping from the OpenAI request type to a custom request, or change all the callsites to use a more generic interface? A few things I'm worried would be lost with the latter:

  • separating context into distinct messages, vs. one big prompt
  • streaming support
  • providing functions (afaik an openai-specific feature)

Anyone have an API they want to propose? Just default LangChain stuff? I've been wary of pulling in LangChain, since I find things more understandable when there's fewer layers of indirection. Even the openai library is hard to find the actual input and output types. I wrote the openai.ts to not have any dependencies or imports, so it's portable and lightweight, but it's also not standardized like LangChain is

from ai-town.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.