amosproj / amos2024ss06-health-ai-framework

Ailixir is an application that utilises LLMs and custom user input to generate AI agent prototypes specialised in fields such as health, economics, physics etc. The prototypes enable the user, which is an entrepreneur-developer, to compare the results produced by different LLMs.
MIT License
7 stars 1 forks source link

Implement the LangChain pipeline in Typescript #118

Closed tubamos closed 1 month ago

tubamos commented 1 month ago

Item type: data pipeline

Description: As people have figured out lately, it is possible to convert the LangChain pipeline in TypeScript so that it can be integrated directly into the frontend of the mobile app without the need for a backend server.

I am not sure how a full decoupling from a backend can be achieved (e.g. how the API keys can be protected in this way).

This can probably be done by utilising the LangChain.js version of LangChain.

https://js.langchain.com/v0.2/docs/introduction/

https://github.com/langchain-ai/langchainjs

Image

User story

Acceptance Criteria

Definition of Done

preetvadaliya commented 1 month ago

No keys to other services (OpenAI etc.) have been embedded in the code.

@tubamos , We need keys to call but that will be inside .env file so it will be not visible on GitHub, and only used while build process.

Even someone try to de-compile android or iOS app then it will be converted into garbage during to de-compile process, so no one get it.

preetvadaliya commented 1 month ago

@tubamos , Here I am seeing LangSmith that will be a good approach to debug app because we will be able to see user's query selected documents from vectorDB and response generated by OpenAI. If someone like to explore this then it might be helpful in future.

preetvadaliya commented 1 month ago

The feature has been fully implemented and integrated into the app.

This thing is depends upon the development of other mobile app stuffs like Auth and etc, so I suggest if someone can show a raw JS or TS that print results on console then also we can consider it as completed. then it will be easy to attach it with app in future.