Skip to main content
Get started with fundamental chat operations including simple conversations, text completions, and core AI interactions.

Chat Completions

Simple conversation with the AI:
  • CLI
  • Python SDK
  • JavaScript SDK
gravixlayer chat --model "meta-llama/llama-3.1-8b-instruct" --system "You are a helpful assistant." --user "What is Python?"
Example Output:
Python is a high-level, interpreted programming language known for its simplicity and readability. It was created by Guido van Rossum and first released in 1991. Python is widely used for web development, data analysis, artificial intelligence, scientific computing, and automation.

Key features of Python include:
- Easy-to-read syntax
- Large standard library
- Cross-platform compatibility
- Strong community support
- Extensive third-party packages

Text Completions

Simple text completion from a prompt:
  • CLI
  • Python SDK
  • JavaScript SDK
gravixlayer chat --mode completions --model "meta-llama/llama-3.1-8b-instruct" --prompt "The future of artificial intelligence is"
Example Output:
The future of artificial intelligence is bright and full of possibilities. AI will continue to revolutionize industries, enhance human capabilities, and solve complex global challenges. We can expect to see advances in machine learning, natural language processing, computer vision, and robotics that will transform how we work, learn, and live.
I