Team Ai
Apppublic

jyotsnaa/code-assistant

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes
test.py13 linesDownload Raw Back to root
1from langchain_community.chat_models.openai import ChatOpenAI2import huggingface_hub3 4def test_code_llama():5    llm = ChatOpenAI(6        model_name="tgi",7        openai_api_base="https://api-inference.huggingface.co/models/codellama/CodeLlama-34b-Instruct-hf" + "/v1/",8    )9    10    11    response = llm.invoke("Why is open-source software important?")12    return response13