A Python package for processing and interpreting structured descriptions of neural network architectures from textual input. Architextor uses pattern matching and retries to parse user-provided text about ANN designs (layer types, connections, parameters, etc.) and returns a formalized, machine-readable representation (e.g., JSON schema or graph outline).
pip install architextorfrom architextor import architextor
user_input = "A neural network with two dense layers: first layer has 128 units and ReLU activation, second has 10 units and softmax activation."
response = architextor(user_input)
print(response)You can pass your own LangChain-compatible LLM instance to use OpenAI:
from langchain_openai import ChatOpenAI
from architextor import architextor
llm = ChatOpenAI()
response = architextor(user_input, llm=llm)use Anthropic:
from langchain_anthropic import ChatAnthropic
from architextor import architextor
llm = ChatAnthropic()
response = architextor(user_input, llm=llm)use Google:
from langchain_google_genai import ChatGoogleGenerativeAI
from architextor import architextor
llm = ChatGoogleGenerativeAI()
response = architextor(user_input, llm=llm)The default LLM is ChatLLM7 (from langchain_llm7). You can provide your own API key:
Via environment variable:
export LLM7_API_KEY="your_api_key_here"Or directly in code:
response = architextor(user_input, api_key="your_api_key_here")Get a free API key by registering at https://token.llm7.io/.
user_input(str): The user input text describing the neural network architecture.llm(Optional[BaseChatModel]): A LangChain LLM instance. If not provided, defaults to ChatLLM7.api_key(Optional[str]): API key for LLM7. If not provided, defaults to theLLM7_API_KEYenvironment variable.
The default rate limits for LLM7 free tier are sufficient for most use cases. For higher rate limits, provide your own API key.
Report issues or feature requests on GitHub.
Eugene Evstafev
Email: hi@euegne.plus
GitHub: chigwell